treewide: Align function definition open/close braces
Subsystems (26)
PATCH v2 1/1 treewide: Align function definition open/close braces
Some functions definitions have either the initial open brace and/or the closing brace outside of column 1.
Move those braces to column 1.
This allows various function analyzers like gnu complexity to work properly for these modified functions.
---
git diff -w still shows no difference.
This patch was sent but December and not applied.
As the trivial maintainer seems not active, it'd be nice if Andrew Morton picks this up.
V2: Remove fs/xfs/libxfs/xfs_alloc.c as it's updated and remerge the rest
arch/x86/include/asm/atomic64_32.h | 2 +- drivers/acpi/custom_method.c | 2 +- drivers/acpi/fan.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/media/i2c/msp3400-kthreads.c | 2 +- drivers/message/fusion/mptsas.c | 2 +- drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 2 +- drivers/net/wireless/ath/ath9k/xmit.c | 2 +- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/rtc/rtc-ab-b5ze-s3.c | 2 +- drivers/scsi/dpt_i2o.c | 2 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +- fs/locks.c | 2 +- fs/ocfs2/stack_user.c | 2 +- fs/xfs/xfs_export.c | 2 +- kernel/audit.c | 6 +++--- kernel/trace/trace_printk.c | 4 ++-- lib/raid6/sse2.c | 14 +++++++------- sound/soc/fsl/fsl_dma.c | 2 +- 19 files changed, 28 insertions(+), 28 deletions(-)
arch/x86/include/asm/atomic64_32.h +1 -1
@@ -123,7 +123,7 @@ static inline long long arch_atomic64_read(const atomic64_t *v)long long r; alternative_atomic64(read, "=&A" (r), "c" (v) : "memory");return r; - } +}/** * arch_atomic64_add_return - add and return
drivers/acpi/custom_method.c +1 -1
@@ -97,7 +97,7 @@ static void __exit acpi_custom_method_exit(void) {if (cm_dentry)debugfs_remove (cm_dentry); - } +}module_init (acpi_custom_method_init);module_exit (acpi_custom_method_exit);
drivers/acpi/fan.c +1 -1
@@ -219,7 +219,7 @@ fan_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state)return fan_set_state_acpi4 (device, state); else return fan_set_state(device, state); - } +}static const struct thermal_cooling_device_ops fan_cooling_ops = { .get_max_state = fan_get_max_state,
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -1
@@ -588,7 +588,7 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)******************************************************************************/ struct dc *dc_create (const struct dc_init_data *init_params) - { +{struct dc *dc =kzalloc (sizeof (*dc),GFP_KERNEL );unsigned int full_pipe_count;
drivers/media/i2c/msp3400-kthreads.c +1 -1
@@ -885,7 +885,7 @@ static int msp34xxg_modus(struct i2c_client *client) }static void msp34xxg_set_source (struct i2c_client *client,u16 reg,int in) - { +{struct msp_state *state =to_state (i2c_get_clientdata (client));int source, matrix;
drivers/message/fusion/mptsas.c +1 -1
@@ -2967,7 +2967,7 @@ mptsas_exp_repmanufacture_info(MPT_ADAPTER *ioc,mutex_unlock (&ioc->sas_mgmt.mutex); out:return ret; - } +} static void mptsas_parse_device_info(struct sas_identify *identify,
drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +1 -1
@@ -603,7 +603,7 @@ static struct uni_table_desc *nx_get_table_desc(const u8 *unirom, int section)static int netxen_nic_validate_header (struct netxen_adapter *adapter) - { +{const u8 *unirom = adapter->fw->data;struct uni_table_desc *directory = (struct uni_table_desc *) &unirom[0 ];u32 fw_file_size = adapter->fw->size;
drivers/net/wireless/ath/ath9k/xmit.c +1 -1
@@ -252,7 +252,7 @@ ath_tid_pull(struct ath_atx_tid *tid) }return skb; - } +}static bool ath_tid_has_buffered (struct ath_atx_tid *tid)
drivers/platform/x86/eeepc-laptop.c +1 -1
@@ -492,7 +492,7 @@ static void eeepc_platform_exit(struct eeepc_laptop *eeepc)* potentially bad time, such as a timer interrupt. */ static void tpd_led_update (struct work_struct *work) - { +{struct eeepc_laptop *eeepc; eeepc = container_of(work, struct eeepc_laptop, tpd_led_work);
drivers/rtc/rtc-ab-b5ze-s3.c +1 -1
@@ -646,7 +646,7 @@ static int abb5zes3_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) ret);return ret; - } +}/* Enable or disable battery low irq generation */ static inline int _abb5zes3_rtc_battery_low_irq_enable(struct regmap *regmap,
drivers/scsi/dpt_i2o.c +1 -1
@@ -3521,7 +3521,7 @@ static int adpt_i2o_systab_send(adpt_hba* pHba)#endif return ret; - } +}/*============================================================================
drivers/scsi/sym53c8xx_2/sym_glue.c +1 -1
@@ -1393,7 +1393,7 @@ static struct Scsi_Host *sym_attach(struct scsi_host_template *tpnt, int unit,scsi_host_put (shost);return NULL ; - } +}/*
fs/locks.c +1 -1
@@ -559,7 +559,7 @@ static const struct lock_manager_operations lease_manager_ops = {* Initialize a lease, use the default lock manager operations */ static int lease_init (struct file *filp,long type,struct file_lock *fl) - { +{if (assign_type (fl, type) !=0 )return -EINVAL ;
fs/ocfs2/stack_user.c +1 -1
@@ -398,7 +398,7 @@ static int ocfs2_control_do_setnode_msg(struct file *file,static int ocfs2_control_do_setversion_msg (struct file *file,struct ocfs2_control_message_setv *msg) - { +{long major, minor;char *ptr =NULL ;struct ocfs2_control_private *p = file->private_data;
fs/xfs/xfs_export.c +1 -1
@@ -122,7 +122,7 @@ xfs_nfs_get_inode(struct super_block *sb, u64 ino, u32 generation) - { +{ xfs_mount_t *mp = XFS_M(sb);xfs_inode_t *ip;int error;
kernel/audit.c +3 -3
@@ -486,15 +486,15 @@ static int audit_set_failure(u32 state)* Drop any references inside the auditd connection tracking struct and free * the memory. */ -static void auditd_conn_free (struct rcu_head *rcu) - { +static void auditd_conn_free (struct rcu_head *rcu) +{struct auditd_connection *ac; ac = container_of(rcu, struct auditd_connection, rcu);put_pid (ac->pid);put_net (ac->net);kfree (ac); - } +}/** * auditd_set - Set/Reset the auditd connection state
kernel/trace/trace_printk.c +2 -2
@@ -196,7 +196,7 @@ struct notifier_block module_trace_bprintk_format_nb = { };int __trace_bprintk (unsigned long ip,const char *fmt, ...) - { +{int ret;va_list ap;
@@ -214,7 +214,7 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...)EXPORT_SYMBOL_GPL (__trace_bprintk);int __ftrace_vbprintk (unsigned long ip,const char *fmt,va_list ap) - { +{if (unlikely (!fmt))return 0 ;
lib/raid6/sse2.c +7 -7
@@ -91,7 +91,7 @@ static void raid6_sse21_gen_syndrome(int disks, size_t bytes, void **ptrs)static void raid6_sse21_xor_syndrome (int disks,int start,int stop,size_t bytes,void **ptrs) - { +{u8 **dptr = (u8 **)ptrs;u8 *p, *q;int d, z, z0;
@@ -200,9 +200,9 @@ static void raid6_sse22_gen_syndrome(int disks, size_t bytes, void **ptrs)kernel_fpu_end (); } -static void raid6_sse22_xor_syndrome (int disks,int start,int stop, +static void raid6_sse22_xor_syndrome (int disks,int start,int stop,size_t bytes,void **ptrs) - { +{u8 **dptr = (u8 **)ptrs;u8 *p, *q;int d, z, z0;
@@ -265,7 +265,7 @@ static void raid6_sse22_gen_syndrome(int disks, size_t bytes, void **ptrs) asmvolatile ("sfence" : : :"memory" );kernel_fpu_end (); - } +}const struct raid6_calls raid6_sse2x2 = { raid6_sse22_gen_syndrome,
@@ -366,9 +366,9 @@ static void raid6_sse24_gen_syndrome(int disks, size_t bytes, void **ptrs)kernel_fpu_end (); } -static void raid6_sse24_xor_syndrome (int disks,int start,int stop, +static void raid6_sse24_xor_syndrome (int disks,int start,int stop,size_t bytes,void **ptrs) - { +{u8 **dptr = (u8 **)ptrs;u8 *p, *q;int d, z, z0;
@@ -471,7 +471,7 @@ static void raid6_sse24_gen_syndrome(int disks, size_t bytes, void **ptrs) } asmvolatile ("sfence" : : :"memory" );kernel_fpu_end (); - } +}const struct raid6_calls raid6_sse2x4 = {
sound/soc/fsl/fsl_dma.c +1 -1
@@ -886,7 +886,7 @@ static const struct snd_pcm_ops fsl_dma_ops = { };static int fsl_soc_dma_probe (struct platform_device *pdev) - { +{struct dma_object *dma;struct device_node *np = pdev->dev.of_node;struct device_node *ssi_np;
Signature · 6 lines
2.15.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): 5ccbbf083e26bddfb4ea4f819ed62347ce266f39.1521669820.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org
Rafael J. Wysocki
Acked-byQuoted 24 lines · Joe Perches
Some functions definitions have either the initial open brace and/or the closing brace outside of column 1.
Move those braces to column 1.
This allows various function analyzers like gnu complexity to work properly for these modified functions.
Signed-off-by Joe Perches <[email protected]>Acked-by Andy Shevchenko <[email protected]>Acked-by Paul Moore <[email protected]>Acked-by Alex Deucher <[email protected]>Acked-by Dave Chinner <[email protected]>Reviewed-by Darrick J. Wong <[email protected]>Acked-by Takashi Iwai <[email protected]>---
git diff -w still shows no difference.
This patch was sent but December and not applied.
Quoted 8 lines
As the trivial maintainer seems not active, it'd be nice if Andrew Morton picks this up.
V2: Remove
fs/xfs/libxfs/xfs_alloc.cas it's updated and remerge the restarch/x86/include/asm/atomic64_32.h | 2 +- drivers/acpi/custom_method.c | 2 +- drivers/acpi/fan.c | 2 +-
For the ACPI changes:
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 39 lines · Joe Perches
Some functions definitions have either the initial open brace and/or the closing brace outside of column 1.
Move those braces to column 1.
This allows various function analyzers like gnu complexity to work properly for these modified functions.
Signed-off-by Joe Perches <[email protected]>Acked-by Andy Shevchenko <[email protected]>Acked-by Paul Moore <[email protected]>Acked-by Alex Deucher <[email protected]>Acked-by Dave Chinner <[email protected]>Reviewed-by Darrick J. Wong <[email protected]>Acked-by Takashi Iwai <[email protected]>---
git diff -w still shows no difference.
This patch was sent but December and not applied.
As the trivial maintainer seems not active, it'd be nice if Andrew Morton picks this up.
V2: Remove
fs/xfs/libxfs/xfs_alloc.cas it's updated and remerge the restarch/x86/include/asm/atomic64_32.h | 2 +- drivers/acpi/custom_method.c | 2 +- drivers/acpi/fan.c | 2 +- drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +- drivers/media/i2c/msp3400-kthreads.c | 2 +- drivers/message/fusion/mptsas.c | 2 +- drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c | 2 +- drivers/net/wireless/ath/ath9k/xmit.c | 2 +- drivers/platform/x86/eeepc-laptop.c | 2 +- drivers/rtc/rtc-ab-b5ze-s3.c | 2 +-
Quoted 8 lines
drivers/scsi/dpt_i2o.c | 2 +- drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +- fs/locks.c | 2 +- fs/ocfs2/stack_user.c | 2 +- fs/xfs/xfs_export.c | 2 +- kernel/audit.c | 6 +++--- kernel/trace/trace_printk.c | 4 ++-- lib/raid6/sse2.c | 14 +++++++-------
For fsl_dma.c:
Quoted 1 line
sound/soc/fsl/fsl_dma.c | 2 +-
Thanks
Quoted 313 lines
19 files changed, 28 insertions(+), 28 deletions(-)arch/x86/include/asm/atomic64_32.h +1
-1@@ -123,7 +123,7 @@ static inline long long arch_atomic64_read(const atomic64_t *v)long long r; alternative_atomic64(read, "=&A" (r), "c" (v) : "memory");return r; - } +}/** * arch_atomic64_add_return - add and return drivers/acpi/custom_method.c +1
-1@@ -97,7 +97,7 @@ static void __exit acpi_custom_method_exit(void) {if (cm_dentry)debugfs_remove (cm_dentry); - } +}module_init (acpi_custom_method_init);module_exit (acpi_custom_method_exit);drivers/acpi/fan.c +1
-1@@ -219,7 +219,7 @@ fan_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state)return fan_set_state_acpi4 (device, state); else return fan_set_state(device, state); - } +}static const struct thermal_cooling_device_ops fan_cooling_ops = { .get_max_state = fan_get_max_state,drivers/gpu/drm/amd/display/dc/core/dc.c +1
-1@@ -588,7 +588,7 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)******************************************************************************/ struct dc *dc_create (const struct dc_init_data *init_params) - { +{struct dc *dc =kzalloc (sizeof (*dc),GFP_KERNEL );unsigned int full_pipe_count;drivers/media/i2c/msp3400-kthreads.c +1
-1@@ -885,7 +885,7 @@ static int msp34xxg_modus(struct i2c_client *client) }static void msp34xxg_set_source (struct i2c_client *client,u16 reg,int in) - { +{struct msp_state *state =to_state (i2c_get_clientdata (client));int source, matrix;drivers/message/fusion/mptsas.c +1
-1@@ -2967,7 +2967,7 @@ mptsas_exp_repmanufacture_info(MPT_ADAPTER *ioc,mutex_unlock (&ioc->sas_mgmt.mutex); out:return ret; - } +} static void mptsas_parse_device_info(struct sas_identify *identify,drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +1
-1@@ -603,7 +603,7 @@ static struct uni_table_desc *nx_get_table_desc(const u8 *unirom, int section)static int netxen_nic_validate_header (struct netxen_adapter *adapter) - { +{const u8 *unirom = adapter->fw->data;struct uni_table_desc *directory = (struct uni_table_desc *) &unirom[0 ];u32 fw_file_size = adapter->fw->size;drivers/net/wireless/ath/ath9k/xmit.c +1
-1@@ -252,7 +252,7 @@ ath_tid_pull(struct ath_atx_tid *tid) }return skb; - } +}static bool ath_tid_has_buffered (struct ath_atx_tid *tid)drivers/platform/x86/eeepc-laptop.c +1
-1@@ -492,7 +492,7 @@ static void eeepc_platform_exit(struct eeepc_laptop *eeepc)* potentially bad time, such as a timer interrupt. */ static void tpd_led_update (struct work_struct *work) - { +{struct eeepc_laptop *eeepc; eeepc = container_of(work, struct eeepc_laptop, tpd_led_work);drivers/rtc/rtc-ab-b5ze-s3.c +1
-1@@ -646,7 +646,7 @@ static int abb5zes3_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) ret);return ret; - } +}/* Enable or disable battery low irq generation */ static inline int _abb5zes3_rtc_battery_low_irq_enable(struct regmap *regmap,drivers/scsi/dpt_i2o.c +1
-1@@ -3521,7 +3521,7 @@ static int adpt_i2o_systab_send(adpt_hba* pHba)#endif return ret; - } +}/*============================================================================ drivers/scsi/sym53c8xx_2/sym_glue.c +1
-1@@ -1393,7 +1393,7 @@ static struct Scsi_Host *sym_attach(struct scsi_host_template *tpnt, int unit,scsi_host_put (shost);return NULL ; - } +}/* fs/locks.c +1
-1@@ -559,7 +559,7 @@ static const struct lock_manager_operations lease_manager_ops = {* Initialize a lease, use the default lock manager operations */ static int lease_init (struct file *filp,long type,struct file_lock *fl) - { +{if (assign_type (fl, type) !=0 )return -EINVAL ;fs/ocfs2/stack_user.c +1
-1@@ -398,7 +398,7 @@ static int ocfs2_control_do_setnode_msg(struct file *file,static int ocfs2_control_do_setversion_msg (struct file *file,struct ocfs2_control_message_setv *msg) - { +{long major, minor;char *ptr =NULL ;struct ocfs2_control_private *p = file->private_data;fs/xfs/xfs_export.c +1
-1@@ -122,7 +122,7 @@ xfs_nfs_get_inode(struct super_block *sb, u64 ino, u32 generation) - { +{ xfs_mount_t *mp = XFS_M(sb);xfs_inode_t *ip;int error;kernel/audit.c +3
-3@@ -486,15 +486,15 @@ static int audit_set_failure(u32 state)* Drop any references inside the auditd connection tracking struct and free * the memory. */ -static void auditd_conn_free (struct rcu_head *rcu) - { +static void auditd_conn_free (struct rcu_head *rcu) +{struct auditd_connection *ac; ac = container_of(rcu, struct auditd_connection, rcu);put_pid (ac->pid);put_net (ac->net);kfree (ac); - } +}/** * auditd_set - Set/Reset the auditd connection state kernel/trace/trace_printk.c +2
-2@@ -196,7 +196,7 @@ struct notifier_block module_trace_bprintk_format_nb = { };int __trace_bprintk (unsigned long ip,const char *fmt, ...) - { +{int ret;va_list ap;@@ -214,7 +214,7 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...)EXPORT_SYMBOL_GPL (__trace_bprintk);int __ftrace_vbprintk (unsigned long ip,const char *fmt,va_list ap) - { +{if (unlikely (!fmt))return 0 ;lib/raid6/sse2.c +7
-7@@ -91,7 +91,7 @@ static void raid6_sse21_gen_syndrome(int disks, size_t bytes, void **ptrs)static void raid6_sse21_xor_syndrome (int disks,int start,int stop,size_t bytes,void **ptrs) - { +{u8 **dptr = (u8 **)ptrs;u8 *p, *q;int d, z, z0;@@ -200,9 +200,9 @@ static void raid6_sse22_gen_syndrome(int disks, size_t bytes, void **ptrs)kernel_fpu_end (); } -static void raid6_sse22_xor_syndrome (int disks,int start,int stop, +static void raid6_sse22_xor_syndrome (int disks,int start,int stop,size_t bytes,void **ptrs) - { +{u8 **dptr = (u8 **)ptrs;u8 *p, *q;int d, z, z0;@@ -265,7 +265,7 @@ static void raid6_sse22_gen_syndrome(int disks, size_t bytes, void **ptrs) asmvolatile ("sfence" : : :"memory" );kernel_fpu_end (); - } +}const struct raid6_calls raid6_sse2x2 = { raid6_sse22_gen_syndrome,@@ -366,9 +366,9 @@ static void raid6_sse24_gen_syndrome(int disks, size_t bytes, void **ptrs)kernel_fpu_end (); } -static void raid6_sse24_xor_syndrome (int disks,int start,int stop, +static void raid6_sse24_xor_syndrome (int disks,int start,int stop,size_t bytes,void **ptrs) - { +{u8 **dptr = (u8 **)ptrs;u8 *p, *q;int d, z, z0;@@ -471,7 +471,7 @@ static void raid6_sse24_gen_syndrome(int disks, size_t bytes, void **ptrs) } asmvolatile ("sfence" : : :"memory" );kernel_fpu_end (); - } +}const struct raid6_calls raid6_sse2x4 = {sound/soc/fsl/fsl_dma.c +1
-1@@ -886,7 +886,7 @@ static const struct snd_pcm_ops fsl_dma_ops = { };static int fsl_soc_dma_probe (struct platform_device *pdev) - { +{struct dma_object *dma;struct device_node *np = pdev->dev.of_node;struct device_node *ssi_np;Signature · 1 line
2.15.0
Joe,
Quoted 4 lines
Some functions definitions have either the initial open brace and/or the closing brace outside of column 1.
Move those braces to column 1.
drivers/scsi and drivers/message/fusion parts look fine.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Quoted 14 lines · On Wed, 21 Mar 2018 15:09:32 -0700 Joe Perches <[email protected]> wrote:
kernel/trace/trace_printk.c +1
-1@@ -196,7 +196,7 @@ struct notifier_block module_trace_bprintk_format_nb = { };int __trace_bprintk (unsigned long ip,const char *fmt, ...) - { +{int ret;va_list ap;
kernel/trace/trace_printk.c int __trace_bprintk(unsigned long ip, const char *fmt, ...) · line 220
Quoted 8 lines
kernel/trace/trace_printk.c +1
-1@@ -214,7 +214,7 @@ int __trace_bprintk(unsigned long ip, const char *fmt, ...)EXPORT_SYMBOL_GPL (__trace_bprintk);int __ftrace_vbprintk (unsigned long ip,const char *fmt,va_list ap) - { +{if (unlikely (!fmt))return 0 ;
-- Steve
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel