scripts: Remove duplicate newlines

Drop all duplicate newlines. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
This commit is contained in:
Marek Vasut 2024-07-13 15:19:31 +02:00 committed by Tom Rini
parent 2cd9466bed
commit 10cb047b8b
18 changed files with 0 additions and 70 deletions

View file

@ -111,7 +111,6 @@ static inline void PRINTF(5, 6) check_msg(struct check *c, struct dt_info *dti,
check_msg((c), dti, node, prop, __VA_ARGS__); \
} while (0)
static void check_nodes_props(struct check *c, struct dt_info *dti, struct node *node)
{
struct node *child;
@ -1076,7 +1075,6 @@ static void check_obsolete_chosen_interrupt_controller(struct check *c,
if (node != dt)
return;
chosen = get_node_by_path(dt, "/chosen");
if (!chosen)
return;

View file

@ -65,7 +65,6 @@ extern int auto_label_aliases; /* auto generate labels -> aliases */
typedef uint32_t cell_t;
#define streq(a, b) (strcmp((a), (b)) == 0)
#define strstarts(s, prefix) (strncmp((s), (prefix), strlen(prefix)) == 0)
#define strprefixeq(a, n, b) (strlen(b) == (n) && (memcmp(a, b, n) == 0))
@ -92,7 +91,6 @@ struct data {
struct marker *markers;
};
#define empty_data ((struct data){ 0 /* all .members = 0 or NULL */ })
#define for_each_marker(m) \
@ -252,7 +250,6 @@ struct reserve_info *chain_reserve_entry(struct reserve_info *first,
struct reserve_info *add_reserve_entry(struct reserve_info *list,
struct reserve_info *new);
struct dt_info {
unsigned int dtsflags;
struct reserve_info *reservelist;

View file

@ -695,7 +695,6 @@ static struct property *flat_read_property(struct inbuf *dtbuf,
return build_property(name, val);
}
static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
{
struct reserve_info *reservelist = NULL;
@ -724,7 +723,6 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
return reservelist;
}
static char *nodename_from_path(const char *ppath, const char *cpath)
{
int plen;
@ -806,7 +804,6 @@ static struct node *unflatten_tree(struct inbuf *dtbuf,
return node;
}
struct dt_info *dt_from_blob(const char *fname)
{
FILE *f;

View file

@ -421,7 +421,6 @@ static const struct fdt_property *fdt_get_property_namelen_(const void *fdt,
return NULL;
}
const struct fdt_property *fdt_get_property_namelen(const void *fdt,
int offset,
const char *name,
@ -439,7 +438,6 @@ const struct fdt_property *fdt_get_property_namelen(const void *fdt,
NULL);
}
const struct fdt_property *fdt_get_property(const void *fdt,
int nodeoffset,
const char *name, int *lenp)

View file

@ -1162,7 +1162,6 @@ int fdt_address_cells(const void *fdt, int nodeoffset);
*/
int fdt_size_cells(const void *fdt, int nodeoffset);
/**********************************************************************/
/* Write-in-place functions */
/**********************************************************************/
@ -1696,7 +1695,6 @@ static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
#define fdt_setprop_string(fdt, nodeoffset, name, str) \
fdt_setprop((fdt), (nodeoffset), (name), (str), strlen(str)+1)
/**
* fdt_setprop_empty - set a property to an empty value
* @fdt: pointer to the device tree blob

View file

@ -631,7 +631,6 @@ uint32_t guess_boot_cpuid(struct node *tree)
if (!cpus)
return 0;
bootcpu = cpus->children;
if (!bootcpu)
return 0;

View file

@ -33,7 +33,6 @@ struct search_path {
/* This is the list of directories that we search for source files */
static struct search_path *search_path_head, **search_path_tail;
static char *get_dirname(const char *path)
{
const char *slash = strrchr(path, '/');
@ -56,7 +55,6 @@ struct srcfile_state *current_srcfile; /* = NULL */
#define MAX_SRCFILE_DEPTH (100)
static int srcfile_depth; /* = 0 */
/**
* Try to open a file in a given directory.
*
@ -250,7 +248,6 @@ srcpos_string(struct srcpos *pos)
if (pos->file && pos->file->name)
fname = pos->file->name;
if (pos->first_line != pos->last_line)
xasprintf(&pos_str, "%s:%d.%d-%d.%d", fname,
pos->first_line, pos->first_column,

View file

@ -95,7 +95,6 @@ struct srcpos {
} \
} while (0)
/*
* Fictional source position used for IR nodes that are
* created without otherwise knowing a true source position.

View file

@ -262,7 +262,6 @@ static void write_tree_source_node(FILE *f, struct node *tree, int level)
fprintf(f, "};\n");
}
void dt_to_source(FILE *f, struct dt_info *dti)
{
struct reserve_info *re;

View file

@ -325,7 +325,6 @@ int utilfdt_write_err(const char *filename, const void *blob)
return ret < 0 ? -ret : 0;
}
int utilfdt_write(const char *filename, const void *blob)
{
int ret = utilfdt_write_err(filename, blob);

View file

@ -360,10 +360,8 @@ void init_right_tree(void)
gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE);
}
/* Utility Functions */
static void text_insert_help(struct menu *menu)
{
GtkTextBuffer *buffer;
@ -388,7 +386,6 @@ static void text_insert_help(struct menu *menu)
str_free(&help);
}
static void text_insert_msg(const char *title, const char *message)
{
GtkTextBuffer *buffer;
@ -409,7 +406,6 @@ static void text_insert_msg(const char *title, const char *message)
NULL);
}
/* Main Windows Callbacks */
void on_save_activate(GtkMenuItem * menuitem, gpointer user_data);
@ -457,13 +453,11 @@ gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event,
return FALSE;
}
void on_window1_destroy(GtkObject * object, gpointer user_data)
{
gtk_main_quit();
}
void
on_window1_size_request(GtkWidget * widget,
GtkRequisition * requisition, gpointer user_data)
@ -483,10 +477,8 @@ on_window1_size_request(GtkWidget * widget,
gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3);
}
/* Menu & Toolbar Callbacks */
static void
load_filename(GtkFileSelection * file_selector, gpointer user_data)
{
@ -520,14 +512,12 @@ void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data)
gtk_widget_show(fs);
}
void on_save_activate(GtkMenuItem * menuitem, gpointer user_data)
{
if (conf_write(NULL))
text_insert_msg("Error", "Unable to save configuration !");
}
static void
store_filename(GtkFileSelection * file_selector, gpointer user_data)
{
@ -561,14 +551,12 @@ void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data)
gtk_widget_show(fs);
}
void on_quit1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
if (!on_window1_delete_event(NULL, NULL, NULL))
gtk_widget_destroy(GTK_WIDGET(main_wnd));
}
void on_show_name1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkTreeViewColumn *col;
@ -579,7 +567,6 @@ void on_show_name1_activate(GtkMenuItem * menuitem, gpointer user_data)
gtk_tree_view_column_set_visible(col, show_name);
}
void on_show_range1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkTreeViewColumn *col;
@ -597,7 +584,6 @@ void on_show_range1_activate(GtkMenuItem * menuitem, gpointer user_data)
}
void on_show_data1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkTreeViewColumn *col;
@ -608,7 +594,6 @@ void on_show_data1_activate(GtkMenuItem * menuitem, gpointer user_data)
gtk_tree_view_column_set_visible(col, show_value);
}
void
on_set_option_mode1_activate(GtkMenuItem *menuitem, gpointer user_data)
{
@ -617,7 +602,6 @@ on_set_option_mode1_activate(GtkMenuItem *menuitem, gpointer user_data)
display_tree(&rootmenu); /* instead of update_tree to speed-up */
}
void
on_set_option_mode2_activate(GtkMenuItem *menuitem, gpointer user_data)
{
@ -626,7 +610,6 @@ on_set_option_mode2_activate(GtkMenuItem *menuitem, gpointer user_data)
display_tree(&rootmenu); /* instead of update_tree to speed-up */
}
void
on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data)
{
@ -635,7 +618,6 @@ on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data)
display_tree(&rootmenu); /* instead of update_tree to speed-up */
}
void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkWidget *dialog;
@ -666,7 +648,6 @@ void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
gtk_widget_show_all(dialog);
}
void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkWidget *dialog;
@ -684,7 +665,6 @@ void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data)
gtk_widget_show_all(dialog);
}
void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkWidget *dialog;
@ -703,7 +683,6 @@ void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data)
gtk_widget_show_all(dialog);
}
void on_back_clicked(GtkButton * button, gpointer user_data)
{
enum prop_type ptype;
@ -718,13 +697,11 @@ void on_back_clicked(GtkButton * button, gpointer user_data)
gtk_widget_set_sensitive(back_btn, FALSE);
}
void on_load_clicked(GtkButton * button, gpointer user_data)
{
on_load1_activate(NULL, user_data);
}
void on_single_clicked(GtkButton * button, gpointer user_data)
{
view_mode = SINGLE_VIEW;
@ -733,7 +710,6 @@ void on_single_clicked(GtkButton * button, gpointer user_data)
display_tree_part();
}
void on_split_clicked(GtkButton * button, gpointer user_data)
{
gint w, h;
@ -749,7 +725,6 @@ void on_split_clicked(GtkButton * button, gpointer user_data)
gtk_widget_set_sensitive(back_btn, FALSE);
}
void on_full_clicked(GtkButton * button, gpointer user_data)
{
view_mode = FULL_VIEW;
@ -760,19 +735,16 @@ void on_full_clicked(GtkButton * button, gpointer user_data)
gtk_widget_set_sensitive(back_btn, FALSE);
}
void on_collapse_clicked(GtkButton * button, gpointer user_data)
{
gtk_tree_view_collapse_all(GTK_TREE_VIEW(tree2_w));
}
void on_expand_clicked(GtkButton * button, gpointer user_data)
{
gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w));
}
/* CTree Callbacks */
/* Change hex/int/string value in the cell */
@ -874,7 +846,6 @@ static gint column2index(GtkTreeViewColumn * column)
return -1;
}
/* User click: update choice (full) or goes down (single) */
gboolean
on_treeview2_button_press_event(GtkWidget * widget,
@ -976,7 +947,6 @@ on_treeview2_key_press_event(GtkWidget * widget,
return FALSE;
}
/* Row selection changed: update help */
void
on_treeview2_cursor_changed(GtkTreeView * treeview, gpointer user_data)
@ -992,7 +962,6 @@ on_treeview2_cursor_changed(GtkTreeView * treeview, gpointer user_data)
}
}
/* User click: display sub-tree in the right frame. */
gboolean
on_treeview1_button_press_event(GtkWidget * widget,
@ -1032,7 +1001,6 @@ on_treeview1_button_press_event(GtkWidget * widget,
return FALSE;
}
/* Fill a row of strings */
static gchar **fill_row(struct menu *menu)
{
@ -1157,7 +1125,6 @@ static gchar **fill_row(struct menu *menu)
return row;
}
/* Set the node content with a row of strings */
static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row)
{
@ -1193,7 +1160,6 @@ static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row)
g_object_unref(pix);
}
/* Add a node to the tree */
static void place_node(struct menu *menu, char **row)
{
@ -1204,7 +1170,6 @@ static void place_node(struct menu *menu, char **row)
set_node(node, menu, row);
}
/* Find a node in the GTK+ tree */
static GtkTreeIter found;
@ -1240,7 +1205,6 @@ GtkTreeIter *gtktree_iter_find_node(GtkTreeIter * parent,
return NULL;
}
/*
* Update the tree by adding/removing entries
* Does not change other nodes
@ -1329,7 +1293,6 @@ static void update_tree(struct menu *src, GtkTreeIter * dst)
}
}
/* Display the whole tree (single/split/full view) */
static void display_tree(struct menu *menu)
{
@ -1439,7 +1402,6 @@ void fixup_rootmenu(struct menu *menu)
}
}
/* Main */
int main(int ac, char *av[])
{

View file

@ -20,12 +20,10 @@
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
struct list_head {
struct list_head *next, *prev;
};
#define LIST_HEAD_INIT(name) { &(name), &(name) }
#define LIST_HEAD(name) \

View file

@ -131,7 +131,6 @@ static inline tristate sym_get_tristate_value(struct symbol *sym)
return sym->curr.tri;
}
static inline struct symbol *sym_get_choice_value(struct symbol *sym)
{
return (struct symbol *)sym->curr.val;

View file

@ -213,7 +213,6 @@ int dialog_yesno(const char *title, const char *prompt, int height, int width);
int dialog_msgbox(const char *title, const char *prompt, int height,
int width, int pause);
typedef void (*update_text_fn)(char *buf, size_t start, size_t end, void
*_data);
int dialog_textbox(const char *title, char *tbuf, int initial_height,

View file

@ -33,7 +33,6 @@ static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw,
wrefresh(dialog);
}
/*
* Display text from a file in a dialog box.
*

View file

@ -853,7 +853,6 @@ struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head)
return res;
}
void menu_get_ext_help(struct menu *menu, struct gstr *help)
{
struct symbol *sym = menu->sym;

View file

@ -687,7 +687,6 @@ static int do_exit(void)
return 0;
}
static void search_conf(void)
{
struct symbol **sym_arr;
@ -731,7 +730,6 @@ again:
str_free(&title);
}
static void build_conf(struct menu *menu)
{
struct symbol *sym;

View file

@ -143,7 +143,6 @@ void set_colors(void)
}
}
/* this changes the windows attributes !!! */
void print_in_middle(WINDOW *win,
int starty,
@ -154,7 +153,6 @@ void print_in_middle(WINDOW *win,
{ int length, x, y;
float temp;
if (win == NULL)
win = stdscr;
getyx(win, y, x);
@ -256,7 +254,6 @@ int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...)
int i, x, y;
int res = -1;
va_start(ap, btn_num);
for (i = 0; i < btn_num; i++) {
btn = va_arg(ap, char *);
@ -280,7 +277,6 @@ int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...)
y = (getmaxy(stdscr)-(msg_lines+4))/2;
x = (getmaxx(stdscr)-(total_width+4))/2;
/* create the windows */
if (btn_num > 0)
win_rows = msg_lines+4;
@ -315,7 +311,6 @@ int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...)
set_menu_mark(menu, "");
post_menu(menu);
touchwin(win);
refresh_all_windows(main_window);
while ((res = wgetch(win))) {