acpi: fix some coding style issues
v3 cover acpi: fix some coding style issues
Fix some coding style issues reported by checkpatch.pl. Only cleanup and no function changes.
Differences from v2 to v3:
- Remove the modifications that may cause function change.
Differences from v1 to v2:
- Add subsystem and module name in the name of patch 05/15.
- Change to use more proper module name for some patch names.
Xiaofei Tan (12):
ACPI: APD: fix a block comment align issue
ACPI: processor: fix some coding style issues
ACPI: ipmi: remove useless return statement for void function
ACPI: LPSS: add a missed blank line after declarations
ACPI: acpi_pad: add a missed blank line after declarations
ACPI: battery: fix some coding style issues
ACPI: button: fix some coding style issues
ACPI: CPPC: fix some coding style issues
ACPI: custom_method: fix a coding style issue
ACPI: PM: add a missed blank line after declarations
ACPI: sysfs: fix some coding style issues
ACPI: dock: fix some coding style issues
drivers/acpi/acpi_apd.c | 8 ++--- drivers/acpi/acpi_ipmi.c | 1 - drivers/acpi/acpi_lpss.c | 2 ++ drivers/acpi/acpi_pad.c | 4 +++ drivers/acpi/acpi_processor.c | 18 +++-------- drivers/acpi/battery.c | 63 ++++++++++++++++++++------------------ drivers/acpi/button.c | 9 ++---- drivers/acpi/cppc_acpi.c | 71 ++++++++++++++++++++++--------------------- drivers/acpi/custom_method.c | 2 +- drivers/acpi/device_pm.c | 3 ++ drivers/acpi/device_sysfs.c | 15 ++++++--- drivers/acpi/dock.c | 7 +++-- 12 files changed, 106 insertions(+), 97 deletions(-)
Signature · 1 line
2.8.1
PATCH v3 1/12 ACPI: APD: fix a block comment align issue
Fix the following coding style issue reported by checkpatch.pl.
WARNING: Block comments should align the * on each line +/**
+* Create platform device during acpi scan attach handle.
--- drivers/acpi/acpi_apd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/acpi/acpi_apd.c +4 -4
@@ -176,10 +176,10 @@ static const struct apd_device_desc hip08_spi_desc = {#endif -/** -* Create platform device during acpi scan attach handle. -* Return value > 0 on success of creating device. -*/ +/* +* Create platform device during acpi scan attach handle. +* Return value > 0 on success of creating device. +*/ static int acpi_apd_create_device (struct acpi_device *adev,const struct acpi_device_id *id) {
Signature · 1 line
2.8.1
PATCH v3 2/12 ACPI: processor: fix some coding style issues
In reply to Xiaofei TanFix some coding style issues reported by checkpatch.pl, including following types:
ERROR: code indent should use tabs where possible
WARNING: Block comments use a trailing */ on a separate line
WARNING: Missing a blank line after declarations
WARNING: labels should not be indented
--- drivers/acpi/acpi_processor.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
drivers/acpi/acpi_processor.c +5 -13
@@ -25,10 +25,7 @@ DEFINE_PER_CPU(struct acpi_processor *, processors);EXPORT_PER_CPU_SYMBOL (processors); -/* -------------------------------------------------------------------------- -Errata Handling --------------------------------------------------------------------------- */ - +/* Errata Handling */ struct acpi_processor_errata errata__read_mostly ;EXPORT_SYMBOL_GPL (errata);
@@ -151,10 +148,7 @@ static int acpi_processor_errata(void)return result; } -/* -------------------------------------------------------------------------- -Initialization --------------------------------------------------------------------------- */ - +/* Initialization */ #ifdef CONFIG_ACPI_HOTPLUG_CPU int __weak acpi_map_cpu (acpi_handle handle,phys_cpuid_t physid,u32 acpi_id,int *pcpu)
@@ -306,6 +300,7 @@ static int acpi_processor_get_info(struct acpi_device *device)*/ if (invalid_logical_cpuid (pr->id) || !cpu_present (pr->id)) {int ret =acpi_processor_hotadd_init (pr); +if (ret)return ret; }
@@ -431,10 +426,7 @@ static int acpi_processor_add(struct acpi_device *device, }#ifdef CONFIG_ACPI_HOTPLUG_CPU -/* -------------------------------------------------------------------------- -Removal --------------------------------------------------------------------------- */ - +/* Removal */ static void acpi_processor_remove (struct acpi_device *device) {struct acpi_processor *pr;
@@ -892,7 +884,7 @@ int acpi_processor_evaluate_cst(acpi_handle handle, u32 cpu, info->count = last_index; - end: +end:kfree (buffer.pointer);return ret;
Signature · 1 line
2.8.1
PATCH v3 3/12 ACPI: ipmi: remove useless return statement for void function
In reply to Xiaofei TanRemove useless return statement for void function, reported by checkpatch.pl.
WARNING: void function return statements are not generally useful
FILE: drivers/acpi/acpi_ipmi.c:482:
+ return;
+}
--- drivers/acpi/acpi_ipmi.c | 1 - 1 file changed, 1 deletion(-)
drivers/acpi/acpi_ipmi.c +0 -1
@@ -478,7 +478,6 @@ static void ipmi_register_bmc(int iface, struct device *dev)ipmi_dev_release (ipmi_device); err_ref:put_device (smi_data.dev); -return ; }static void ipmi_bmc_gone (int iface)
Signature · 1 line
2.8.1
PATCH v3 4/12 ACPI: LPSS: add a missed blank line after declarations
In reply to Xiaofei TanAdd a missed blank line after declarations, reported by checkpatch.pl.
--- drivers/acpi/acpi_lpss.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/acpi_lpss.c +2 -0
@@ -377,6 +377,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {static int is_memory (struct acpi_resource *res,void *not_used) {struct resource r; +return !acpi_dev_resource_memory (res, &r); }
@@ -1200,6 +1201,7 @@ static int acpi_lpss_poweroff_noirq(struct device *dev)if (pdata->dev_desc->resume_from_noirq) {/* This is analogous to the acpi_lpss_suspend_noirq() case. */ int ret =acpi_lpss_do_poweroff_late (dev); +if (ret)return ret; }
Signature · 1 line
2.8.1
PATCH v3 5/12 ACPI: acpi_pad: add a missed blank line after declarations
In reply to Xiaofei TanAdd a missed blank line after declarations, reported by checkpatch.pl.
--- drivers/acpi/acpi_pad.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/acpi/acpi_pad.c +4 -0
@@ -128,6 +128,7 @@ static void round_robin_cpu(unsigned int tsk_index)static void exit_round_robin (unsigned int tsk_index) {struct cpumask *pad_busy_cpus =to_cpumask (pad_busy_cpus_bits); +cpumask_clear_cpu (tsk_in_cpu[tsk_index], pad_busy_cpus); tsk_in_cpu[tsk_index] =-1 ; }
@@ -265,6 +266,7 @@ static ssize_t rrtime_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { unsigned long num; +if (kstrtoul (buf,0 , &num))return -EINVAL ;if (num <1 || num >=100 )
@@ -286,6 +288,7 @@ static ssize_t idlepct_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { unsigned long num; +if (kstrtoul (buf,0 , &num))return -EINVAL ;if (num <1 || num >=100 )
@@ -307,6 +310,7 @@ static ssize_t idlecpus_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { unsigned long num; +if (kstrtoul (buf,0 , &num))return -EINVAL ;mutex_lock (&isolated_cpus_lock);
Signature · 1 line
2.8.1
PATCH v3 6/12 ACPI: battery: fix some coding style issues
In reply to Xiaofei TanFix some coding style issues reported by checkpatch.pl, including following types:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
ERROR: code indent should use tabs where possible
WARNING: Missing a blank line after declarations
ERROR: spaces required around that '?' (ctx:WxV)
WARNING: Block comments should align the * on each line
--- drivers/acpi/battery.c | 63 +++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 29 deletions(-)
drivers/acpi/battery.c +34 -29
@@ -74,16 +74,17 @@ enum {ACPI_BATTERY_XINFO_PRESENT ,ACPI_BATTERY_QUIRK_PERCENTAGE_CAPACITY ,/* On Lenovo Thinkpad models from 2010 and 2011, the power unit -switches between mWh and mAh depending on whether the system -is running on battery or not. When mAh is the unit, most -reported values are incorrect and need to be adjusted by -10000/design_voltage. Verified on x201, t410, t410s, and x220. -Pre-2010 and 2012 models appear to always report in mWh and -are thus unaffected (tested with t42, t61, t500, x200, x300, -and x230). Also, in mid-2012 Lenovo issued a BIOS update for -the 2011 models that fixes the issue (tested on x220 with a -post-1.29 BIOS), but as of Nov. 2012, no such update is -available for the 2010 models. */ +* switches between mWh and mAh depending on whether the system +* is running on battery or not. When mAh is the unit, most +* reported values are incorrect and need to be adjusted by +* 10000/design_voltage. Verified on x201, t410, t410s, and x220. +* Pre-2010 and 2012 models appear to always report in mWh and +* are thus unaffected (tested with t42, t61, t500, x200, x300, +* and x230). Also, in mid-2012 Lenovo issued a BIOS update for +* the 2011 models that fixes the issue (tested on x220 with a +* post-1.29 BIOS), but as of Nov. 2012, no such update is +* available for the 2010 models. +*/ ACPI_BATTERY_QUIRK_THINKPAD_MAH,/* for batteries reporting current capacity with design capacity * on a full charge, but showing degradation in full charge cap.
@@ -371,9 +372,7 @@ static enum power_supply_property energy_battery_full_cap_broken_props[] = { POWER_SUPPLY_PROP_SERIAL_NUMBER, }; -/* -------------------------------------------------------------------------- -Battery Management --------------------------------------------------------------------------- */ +/* Battery Management */ struct acpi_offsets {size_t offset;/* offset inside struct acpi_sbs_battery */ u8 mode;/* int or string? */
@@ -431,6 +430,7 @@ static int extract_package(struct acpi_battery *battery, {int i;union acpi_object *element; +if (package->type !=ACPI_TYPE_PACKAGE )return -EFAULT ;for (i =0 ; i < num; ++i) {
@@ -439,6 +439,7 @@ static int extract_package(struct acpi_battery *battery, element = &package->package.elements[i];if (offsets[i].mode) {u8 *ptr = (u8 *)battery + offsets[i].offset; +if (element->type ==ACPI_TYPE_STRING || element->type ==ACPI_TYPE_BUFFER )strncpy (ptr, element->string.pointer,32 );
@@ -497,10 +498,12 @@ static int extract_battery_info(const int use_bix, battery->design_capacity_warning *10000 / battery->design_voltage;/* Curiously, design_capacity_low, unlike the rest of them, -is correct. */ +* is correct. +*/ /* capacity_granularity_* equal 1 on the systems tested, so -it's impossible to tell if they would need an adjustment -or not if their values were higher. */ +* it's impossible to tell if they would need an adjustment +* or not if their values were higher. +*/ }if (test_bit (ACPI_BATTERY_QUIRK_DEGRADED_FULL_CHARGE , &battery->flags) && battery->capacity_now > battery->full_charge_capacity)
@@ -532,8 +535,8 @@ static int acpi_battery_get_info(struct acpi_battery *battery)if (ACPI_FAILURE (status)) {acpi_handle_info (battery->device->handle,"%s evaluation failed: %s\n" , - use_bix ?"_BIX" :"_BIF" , -acpi_format_exception (status)); + use_bix ?"_BIX" :"_BIF" , +acpi_format_exception (status)); }else { result = extract_battery_info(use_bix, battery,
@@ -648,6 +651,7 @@ static ssize_t acpi_battery_alarm_show(struct device *dev, char *buf) {struct acpi_battery *battery =to_acpi_battery (dev_get_drvdata (dev)); +return sprintf (buf,"%d\n" , battery->alarm *1000 ); }
@@ -657,6 +661,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev, {unsigned long x;struct acpi_battery *battery =to_acpi_battery (dev_get_drvdata (dev)); +if (sscanf (buf,"%lu\n" , &x) ==1 ) battery->alarm = x/1000 ;if (acpi_battery_present (battery))
@@ -743,7 +748,7 @@ EXPORT_SYMBOL_GPL(battery_hook_register);* This function gets called right after the battery sysfs * attributes have been added, so that the drivers that * define custom sysfs attributes can add their own. -*/ +*/ static void battery_hook_add_battery (struct acpi_battery *battery) {struct acpi_battery_hook *hook_node, *tmp;
@@ -872,10 +877,12 @@ static void find_battery(const struct dmi_header *dm, void *private) {struct acpi_battery *battery = (struct acpi_battery *)private;/* Note: the hardcoded offsets below have been extracted from -the source code of dmidecode. */ +* the source code of dmidecode. +*/ if (dm->type ==DMI_ENTRY_PORTABLE_BATTERY && dm->length >=8 ) {const u8 *dmi_data = (const u8 *)(dm +1 );int dmi_capacity =get_unaligned ((const u16 *)(dmi_data +6 )); +if (dm->length >=18 ) dmi_capacity *= dmi_data[17 ]; if (battery->design_capacity * battery->design_voltage / 1000
@@ -917,6 +924,7 @@ static void acpi_battery_quirks(struct acpi_battery *battery)if (battery->power_unit &&dmi_name_in_vendors ("LENOVO" )) {const char *s; + s =dmi_get_system_info (DMI_PRODUCT_VERSION );if (s && !strncasecmp (s,"ThinkPad" ,8 )) {dmi_walk (find_battery, battery);
@@ -1013,10 +1021,7 @@ static void acpi_battery_refresh(struct acpi_battery *battery)sysfs_add_battery (battery); } -/* -------------------------------------------------------------------------- -Driver Interface --------------------------------------------------------------------------- */ - +/* Driver Interface */ static void acpi_battery_notify (struct acpi_device *device,u32 event) {struct acpi_battery *battery =acpi_driver_data (device);
@@ -1026,11 +1031,11 @@ static void acpi_battery_notify(struct acpi_device *device, u32 event)return ; old = battery->bat;/* -* On Acer Aspire V5-573G notifications are sometimes triggered too -* early. For example, when AC is unplugged and notification is -* triggered, battery state is still reported as "Full", and changes to -* "Discharging" only after short delay, without any notification. -*/ +* On Acer Aspire V5-573G notifications are sometimes triggered too +* early. For example, when AC is unplugged and notification is +* triggered, battery state is still reported as "Full", and changes to +* "Discharging" only after short delay, without any notification. +*/ if (battery_notification_delay_ms >0 )msleep (battery_notification_delay_ms);if (event ==ACPI_BATTERY_NOTIFY_INFO )
Signature · 1 line
2.8.1
PATCH v3 7/12 ACPI: button: fix some coding style issues
In reply to Xiaofei TanFix some coding style issues reported by checkpatch.pl, including following types:
WARNING: Block comments use * on subsequent lines
WARNING: Block comments use a trailing */ on a separate line
ERROR: code indent should use tabs where possible
--- drivers/acpi/button.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/acpi/button.c +2 -7
@@ -156,10 +156,7 @@ static unsigned long lid_report_interval __read_mostly = 500;module_param (lid_report_interval, ulong,0644 );MODULE_PARM_DESC (lid_report_interval,"Interval (ms) between lid key events" ); -/* -------------------------------------------------------------------------- -FS Interface (/proc) --------------------------------------------------------------------------- */ - +/* FS Interface (/proc) */ static struct proc_dir_entry *acpi_button_dir;static struct proc_dir_entry *acpi_lid_dir;
@@ -348,9 +345,7 @@ static int acpi_button_remove_fs(struct acpi_device *device)return 0 ; } -/* -------------------------------------------------------------------------- -Driver Interface --------------------------------------------------------------------------- */ +/* Driver Interface */ int acpi_lid_open (void ) {if (!lid_device)
Signature · 1 line
2.8.1
PATCH v3 8/12 ACPI: CPPC: fix some coding style issues
In reply to Xiaofei TanFix some coding style issues reported by checkpatch.pl, including following types:
WARNING: Missing a blank line after declarations
WARNING: unnecessary whitespace before a quoted newline
ERROR: spaces required around that '>='
ERROR: switch and case should be at the same indent
--- drivers/acpi/cppc_acpi.c | 71 ++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 35 deletions(-)
drivers/acpi/cppc_acpi.c +36 -35
@@ -326,6 +326,7 @@ static int send_pcc_cmd(int pcc_ss_id, u16 cmd)if (unlikely (ret)) {for_each_possible_cpu (i) {struct cpc_desc *desc =per_cpu (cpc_desc_ptr, i); +if (!desc)continue ;
@@ -777,7 +778,7 @@ int acpi_cppc_processor_probe(struct acpi_processor *pr) cpc_ptr->cpc_regs[i-2 ].type =ACPI_TYPE_BUFFER ;memcpy (&cpc_ptr->cpc_regs[i-2 ].cpc_entry.reg, gas_t,sizeof (*gas_t)); }else { -pr_debug ("Err in entry:%d in CPC table of CPU:%d \n" , i, pr->id); +pr_debug ("Err in entry:%d in CPC table of CPU:%d\n" , i, pr->id); goto out_free; } }
@@ -867,7 +868,7 @@ void acpi_cppc_processor_exit(struct acpi_processor *pr)void __iomem *addr;int pcc_ss_id =per_cpu (cpu_pcc_subspace_idx, pr->id); -if (pcc_ss_id >=0 && pcc_data[pcc_ss_id]) { +if (pcc_ss_id >=0 && pcc_data[pcc_ss_id]) {if (pcc_data[pcc_ss_id]->pcc_channel_acquired) { pcc_data[pcc_ss_id]->refcount--;if (!pcc_data[pcc_ss_id]->refcount) {
@@ -954,22 +955,22 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val) val, reg->bit_width);switch (reg->bit_width) { -case 8 : - *val =readb_relaxed (vaddr); -break ; -case 16 : - *val =readw_relaxed (vaddr); -break ; -case 32 : - *val =readl_relaxed (vaddr); -break ; -case 64 : - *val =readq_relaxed (vaddr); -break ; -default : -pr_debug ("Error: Cannot read %u bit width from PCC for ss: %d\n" , - reg->bit_width, pcc_ss_id); - ret_val = -EFAULT ; +case 8 : + *val =readb_relaxed (vaddr); +break ; +case 16 : + *val =readw_relaxed (vaddr); +break ; +case 32 : + *val =readl_relaxed (vaddr); +break ; +case 64 : + *val =readq_relaxed (vaddr); +break ; +default : +pr_debug ("Error: Cannot read %u bit width from PCC for ss: %d\n" , + reg->bit_width, pcc_ss_id); + ret_val = -EFAULT ; }return ret_val;
@@ -993,23 +994,23 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val) val, reg->bit_width);switch (reg->bit_width) { -case 8 : -writeb_relaxed (val, vaddr); -break ; -case 16 : -writew_relaxed (val, vaddr); -break ; -case 32 : -writel_relaxed (val, vaddr); -break ; -case 64 : -writeq_relaxed (val, vaddr); -break ; -default : -pr_debug ("Error: Cannot write %u bit width to PCC for ss: %d\n" , - reg->bit_width, pcc_ss_id); - ret_val = -EFAULT ; -break ; +case 8 : +writeb_relaxed (val, vaddr); +break ; +case 16 : +writew_relaxed (val, vaddr); +break ; +case 32 : +writel_relaxed (val, vaddr); +break ; +case 64 : +writeq_relaxed (val, vaddr); +break ; +default : +pr_debug ("Error: Cannot write %u bit width to PCC for ss: %d\n" , + reg->bit_width, pcc_ss_id); + ret_val = -EFAULT ; +break ; }return ret_val;
Signature · 1 line
2.8.1
PATCH v3 9/12 ACPI: custom_method: fix a coding style issue
In reply to Xiaofei TanFix the following coding style issue reported by checkpatch.pl
ERROR: "foo * bar" should be "foo *bar"
FILE: drivers/acpi/custom_method.c:22:
+static ssize_t cm_write(struct file *file, const char __user * user_buf,
--- drivers/acpi/custom_method.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/custom_method.c +1 -1
@@ -19,7 +19,7 @@ static struct dentry *cm_dentry;/* /sys/kernel/debug/acpi/custom_method */ -static ssize_t cm_write (struct file *file,const char __user * user_buf, +static ssize_t cm_write (struct file *file,const char __user *user_buf,size_t count,loff_t *ppos) {static char *buf;
Signature · 1 line
2.8.1
PATCH v3 10/12 ACPI: PM: add a missed blank line after declarations
In reply to Xiaofei TanAdd a missed blank line after declarations, reported by checkpatch.pl.
--- drivers/acpi/device_pm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/acpi/device_pm.c +3 -0
@@ -966,6 +966,7 @@ EXPORT_SYMBOL_GPL(acpi_dev_resume);int acpi_subsys_runtime_suspend (struct device *dev) {int ret =pm_generic_runtime_suspend (dev); +return ret ? ret :acpi_dev_suspend (dev, true); }EXPORT_SYMBOL_GPL (acpi_subsys_runtime_suspend);
@@ -980,6 +981,7 @@ EXPORT_SYMBOL_GPL(acpi_subsys_runtime_suspend);int acpi_subsys_runtime_resume (struct device *dev) {int ret =acpi_dev_resume (dev); +return ret ? ret :pm_generic_runtime_resume (dev); }EXPORT_SYMBOL_GPL (acpi_subsys_runtime_resume);
@@ -1171,6 +1173,7 @@ EXPORT_SYMBOL_GPL(acpi_subsys_freeze);int acpi_subsys_restore_early (struct device *dev) {int ret =acpi_dev_resume (dev); +return ret ? ret :pm_generic_restore_early (dev); }EXPORT_SYMBOL_GPL (acpi_subsys_restore_early);
Signature · 1 line
2.8.1
PATCH v3 11/12 ACPI: sysfs: fix some coding style issues
In reply to Xiaofei TanFix some coding style issues reported by checkpatch.pl, including following types:
WARNING: Missing a blank line after declarations
WARNING: Block comments should align the * on each line
ERROR: open brace '{' following function definitions go on the next line
--- drivers/acpi/device_sysfs.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/acpi/device_sysfs.c +10 -5
@@ -73,6 +73,7 @@ static const struct sysfs_ops acpi_data_node_sysfs_ops = {static void acpi_data_node_release (struct kobject *kobj) {struct acpi_data_node *dn =to_data_node (kobj); +complete (&dn->kobj_done); }
@@ -130,7 +131,7 @@ static void acpi_hide_nondev_subnodes(struct acpi_device_data *data)* Return: 0: no _HID and no _CID * -EINVAL: output error * -ENOMEM: output is truncated -*/ +*/ static int create_pnp_modalias (struct acpi_device *acpi_dev,char *modalias,int size) {
@@ -431,7 +432,8 @@ static DEVICE_ATTR_RO(path);/* sysfs file that shows description text from the ACPI _STR method */ static ssize_t description_show (struct device *dev,struct device_attribute *attr, -char *buf) { +char *buf) +{struct acpi_device *acpi_dev =to_acpi_device (dev);int result;
@@ -456,7 +458,8 @@ static DEVICE_ATTR_RO(description);static ssize_t sun_show (struct device *dev,struct device_attribute *attr, -char *buf) { +char *buf) +{struct acpi_device *acpi_dev =to_acpi_device (dev);acpi_status status;unsigned long long sun;
@@ -471,7 +474,8 @@ static DEVICE_ATTR_RO(sun);static ssize_t hrv_show (struct device *dev,struct device_attribute *attr, -char *buf) { +char *buf) +{struct acpi_device *acpi_dev =to_acpi_device (dev);acpi_status status;unsigned long long hrv;
@@ -485,7 +489,8 @@ hrv_show(struct device *dev, struct device_attribute *attr,static DEVICE_ATTR_RO (hrv);static ssize_t status_show (struct device *dev,struct device_attribute *attr, -char *buf) { +char *buf) +{struct acpi_device *acpi_dev =to_acpi_device (dev);acpi_status status;unsigned long long sta;
Signature · 1 line
2.8.1
PATCH v3 12/12 ACPI: dock: fix some coding style issues
In reply to Xiaofei TanFix some coding style issues reported by checkpatch.pl, including following types:
WARNING: Missing a blank line after declarations
ERROR: spaces required around that ':'
WARNING: Statements should start on a tabstop
--- drivers/acpi/dock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/acpi/dock.c +5 -2
@@ -271,6 +271,7 @@ static void hotplug_dock_devices(struct dock_station *ds, u32 event)if (!acpi_device_enumerated (adev)) {int ret =acpi_bus_scan (adev->handle); +if (ret)dev_dbg (&adev->dev,"scan error %d\n" , -ret); }
@@ -502,6 +503,7 @@ static ssize_t flags_show(struct device *dev, struct device_attribute *attr, char *buf) { struct dock_station *dock_station = dev->platform_data; +return snprintf (buf,PAGE_SIZE ,"%d\n" , dock_station->flags); }
@@ -523,7 +525,7 @@ static ssize_t undock_store(struct device *dev, struct device_attribute *attr,begin_undock (dock_station); ret =handle_eject_request (dock_station,ACPI_NOTIFY_EJECT_REQUEST );acpi_scan_lock_release (); -return ret ? ret: count; +return ret ? ret : count; }static DEVICE_ATTR_WO (undock);
@@ -535,10 +537,11 @@ static ssize_t uid_show(struct device *dev, {unsigned long long lbuf;struct dock_station *dock_station = dev->platform_data; +acpi_status status =acpi_evaluate_integer (dock_station->handle,"_UID" ,NULL , &lbuf);if (ACPI_FAILURE (status)) -return 0 ; +return 0 ;return snprintf (buf,PAGE_SIZE ,"%llx\n" , lbuf); }
Signature · 1 line
2.8.1
Rafael J. Wysocki
maintainerQuoted 39 lines · Xiaofei Tan
Fix some coding style issues reported by checkpatch.pl. Only cleanup and no function changes.
Differences from v2 to v3:
- Remove the modifications that may cause function change.Differences from v1 to v2:
- Add subsystem and module name in the name of patch 05/15.
- Change to use more proper module name for some patch names.Xiaofei Tan (12):
ACPI: APD: fix a block comment align issue
ACPI: processor: fix some coding style issues
ACPI: ipmi: remove useless return statement for void function
ACPI: LPSS: add a missed blank line after declarations
ACPI:acpi_pad: add a missed blank line after declarations
ACPI: battery: fix some coding style issues
ACPI: button: fix some coding style issues
ACPI: CPPC: fix some coding style issues
ACPI:custom_method: fix a coding style issue
ACPI: PM: add a missed blank line after declarations
ACPI: sysfs: fix some coding style issues
ACPI: dock: fix some coding style issuesdrivers/acpi/acpi_apd.c | 8 ++--- drivers/acpi/acpi_ipmi.c | 1 - drivers/acpi/acpi_lpss.c | 2 ++ drivers/acpi/acpi_pad.c | 4 +++ drivers/acpi/acpi_processor.c | 18 +++-------- drivers/acpi/battery.c | 63 ++++++++++++++++++++------------------ drivers/acpi/button.c | 9 ++---- drivers/acpi/cppc_acpi.c | 71 ++++++++++++++++++++++--------------------- drivers/acpi/custom_method.c | 2 +- drivers/acpi/device_pm.c | 3 ++ drivers/acpi/device_sysfs.c | 15 ++++++--- drivers/acpi/dock.c | 7 +++-- 12 files changed, 106 insertions(+), 97 deletions(-)
Quoted 1 line
--
Can you please stop sending new versions of this for a while?
You've sent three of them over the last weekend and honestly I haven't had a chance to look at the first one even.
Hi Rafael,
Quoted 40 lines · Rafael J. Wysocki
Quoted 39 lines · Xiaofei Tan
Fix some coding style issues reported by checkpatch.pl. Only cleanup and no function changes.
Differences from v2 to v3:
- Remove the modifications that may cause function change.Differences from v1 to v2:
- Add subsystem and module name in the name of patch 05/15.
- Change to use more proper module name for some patch names.Xiaofei Tan (12):
ACPI: APD: fix a block comment align issue
ACPI: processor: fix some coding style issues
ACPI: ipmi: remove useless return statement for void function
ACPI: LPSS: add a missed blank line after declarations
ACPI:acpi_pad: add a missed blank line after declarations
ACPI: battery: fix some coding style issues
ACPI: button: fix some coding style issues
ACPI: CPPC: fix some coding style issues
ACPI:custom_method: fix a coding style issue
ACPI: PM: add a missed blank line after declarations
ACPI: sysfs: fix some coding style issues
ACPI: dock: fix some coding style issuesdrivers/acpi/acpi_apd.c | 8 ++--- drivers/acpi/acpi_ipmi.c | 1 - drivers/acpi/acpi_lpss.c | 2 ++ drivers/acpi/acpi_pad.c | 4 +++ drivers/acpi/acpi_processor.c | 18 +++-------- drivers/acpi/battery.c | 63 ++++++++++++++++++++------------------ drivers/acpi/button.c | 9 ++---- drivers/acpi/cppc_acpi.c | 71 ++++++++++++++++++++++--------------------- drivers/acpi/custom_method.c | 2 +- drivers/acpi/device_pm.c | 3 ++ drivers/acpi/device_sysfs.c | 15 ++++++--- drivers/acpi/dock.c | 7 +++-- 12 files changed, 106 insertions(+), 97 deletions(-)
Quoted 4 lines
Quoted 1 line
--
Can you please stop sending new versions of this for a while?
OK.
Quoted 2 lines
You've sent three of them over the last weekend and honestly I haven't had a chance to look at the first one even.
I tried to fix a low-level mistake as quickly as possible. I'm sorry for that
Quoted 4 lines
_______________________________________________
Linuxarm mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Rafael J. Wysocki
maintainerQuoted 11 lines · Xiaofei Tan
Fix some coding style issues reported by checkpatch.pl. Only cleanup and no function changes.
Differences from v2 to v3:
- Remove the modifications that may cause function change.Differences from v1 to v2:
- Add subsystem and module name in the name of patch 05/15.
- Change to use more proper module name for some patch names.
Quoted 13 lines
Xiaofei Tan (12):
ACPI: APD: fix a block comment align issue
ACPI: processor: fix some coding style issues
ACPI: ipmi: remove useless return statement for void function
ACPI: LPSS: add a missed blank line after declarations
ACPI:acpi_pad: add a missed blank line after declarations
ACPI: battery: fix some coding style issues
ACPI: button: fix some coding style issues
ACPI: CPPC: fix some coding style issues
ACPI:custom_method: fix a coding style issue
ACPI: PM: add a missed blank line after declarations
ACPI: sysfs: fix some coding style issues
ACPI: dock: fix some coding style issues
All applied as 5.13 material, thanks!