From 447a5647c9e7ab97780541f546a90e2620caa487 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 21 Mar 2018 15:09:32 -0700 Subject: 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. Signed-off-by: Joe Perches Acked-by: Andy Shevchenko Acked-by: Paul Moore Acked-by: Alex Deucher Acked-by: Dave Chinner Reviewed-by: Darrick J. Wong Acked-by: Alexandre Belloni Acked-by: Martin K. Petersen Acked-by: Takashi Iwai Acked-by: Mauro Carvalho Chehab Acked-by: Rafael J. Wysocki Acked-by: Nicolin Chen Acked-by: Martin K. Petersen Acked-by: Steven Rostedt (VMware) Signed-off-by: Jiri Kosina --- 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 +- 11 files changed, 11 insertions(+), 11 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/custom_method.c b/drivers/acpi/custom_method.c index c68e72414a67..e967c1173ba3 100644 --- a/drivers/acpi/custom_method.c +++ b/drivers/acpi/custom_method.c @@ -94,7 +94,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); diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 6cf4988206f2..3563103590c6 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c @@ -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, diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 12868c769606..5b15c04ce751 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -463,7 +463,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; diff --git a/drivers/media/i2c/msp3400-kthreads.c b/drivers/media/i2c/msp3400-kthreads.c index 4dd01e9f553b..dc6cb8d475b3 100644 --- a/drivers/media/i2c/msp3400-kthreads.c +++ b/drivers/media/i2c/msp3400-kthreads.c @@ -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; diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 439ee9c5f535..231f3a1e27bf 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -2967,7 +2967,7 @@ out_unlock: mutex_unlock(&ioc->sas_mgmt.mutex); out: return ret; - } +} static void mptsas_parse_device_info(struct sas_identify *identify, diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c index 3dd973475125..0ea141ece19e 100644 --- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c +++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c @@ -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; diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 396bf05c6bf6..88be55ed5b4d 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c @@ -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) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 5a681962899c..4c38904a8a32 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -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); diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c index a319bf1e49de..ef5c16dfabfa 100644 --- a/drivers/rtc/rtc-ab-b5ze-s3.c +++ b/drivers/rtc/rtc-ab-b5ze-s3.c @@ -648,7 +648,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, diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index fd172b0890d3..a00d822e3142 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -3524,7 +3524,7 @@ static int adpt_i2o_systab_send(adpt_hba* pHba) #endif return ret; - } +} /*============================================================================ diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 791a2182de53..7320d5fe4cbc 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -1393,7 +1393,7 @@ static struct Scsi_Host *sym_attach(struct scsi_host_template *tpnt, int unit, scsi_host_put(shost); return NULL; - } +} /* -- cgit v1.2.3 From 2f097267e70e2775780bee117d0c62011b740f4c Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Mon, 8 Jan 2018 09:57:10 +0100 Subject: GenWQE: Fix a typo in two comments Add a missing character in two words of these descriptions. Signed-off-by: Markus Elfring Acked-by: Frank Haverkamp Signed-off-by: Jiri Kosina --- drivers/misc/genwqe/card_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/misc/genwqe/card_utils.c b/drivers/misc/genwqe/card_utils.c index 8f2e6442d88b..8679e0bd8ec2 100644 --- a/drivers/misc/genwqe/card_utils.c +++ b/drivers/misc/genwqe/card_utils.c @@ -453,7 +453,7 @@ int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl, s += 8; /* continue 8 elements further */ } fixup: - if (j == 1) { /* combining happend on last entry! */ + if (j == 1) { /* combining happened on last entry! */ s -= 8; /* full shift needed on previous sgl block */ j = 7; /* shift all elements */ } @@ -471,7 +471,7 @@ int genwqe_setup_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl, * genwqe_free_sync_sgl() - Free memory for sgl and overlapping pages * * After the DMA transfer has been completed we free the memory for - * the sgl and the cached pages. Data is being transfered from cached + * the sgl and the cached pages. Data is being transferred from cached * pages into user-space buffers. */ int genwqe_free_sync_sgl(struct genwqe_dev *cd, struct genwqe_sgl *sgl) -- cgit v1.2.3 From bc8282a730215f1ffab5959556b20e99c7ff6cef Mon Sep 17 00:00:00 2001 From: Masanari Iida Date: Tue, 16 Jan 2018 00:18:36 +0900 Subject: treewide: Fix typos in printk This patch fixes spelling typos found in printk. Signed-off-by: Masanari Iida Acked-by: Randy Dunlap Signed-off-by: Jiri Kosina --- drivers/fmc/fmc-core.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- drivers/gpu/drm/i915/intel_cdclk.c | 4 ++-- drivers/net/ethernet/qlogic/qed/qed_int.c | 2 +- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- drivers/scsi/aacraid/src.c | 4 ++-- drivers/scsi/qedi/qedi_fw.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/fmc/fmc-core.c b/drivers/fmc/fmc-core.c index cec3b8db0d69..bbcb505d1522 100644 --- a/drivers/fmc/fmc-core.c +++ b/drivers/fmc/fmc-core.c @@ -244,7 +244,7 @@ int fmc_device_register_n_gw(struct fmc_device **devs, int n, if (!fmc->carrier_name || !fmc->carrier_data || !fmc->device_id) { dev_err(fmc->hwdev, - "deivce nr %i: carrier name, " + "device nr %i: carrier name, " "data or dev_id not set\n", i); ret = -EINVAL; } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index 474f88fbafce..0c4ec14ea478 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c @@ -276,7 +276,7 @@ amdgpu_ucode_get_load_type(struct amdgpu_device *adev, int load_type) else return AMDGPU_FW_LOAD_PSP; default: - DRM_ERROR("Unknow firmware load type\n"); + DRM_ERROR("Unknown firmware load type\n"); } return AMDGPU_FW_LOAD_DIRECT; diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c index 1704c8897afd..63b946790345 100644 --- a/drivers/gpu/drm/i915/intel_cdclk.c +++ b/drivers/gpu/drm/i915/intel_cdclk.c @@ -1626,7 +1626,7 @@ static void cnl_cdclk_pll_disable(struct drm_i915_private *dev_priv) /* Timeout 200us */ if (wait_for((I915_READ(BXT_DE_PLL_ENABLE) & BXT_DE_PLL_LOCK) == 0, 1)) - DRM_ERROR("timout waiting for CDCLK PLL unlock\n"); + DRM_ERROR("timeout waiting for CDCLK PLL unlock\n"); dev_priv->cdclk.hw.vco = 0; } @@ -1644,7 +1644,7 @@ static void cnl_cdclk_pll_enable(struct drm_i915_private *dev_priv, int vco) /* Timeout 200us */ if (wait_for((I915_READ(BXT_DE_PLL_ENABLE) & BXT_DE_PLL_LOCK) != 0, 1)) - DRM_ERROR("timout waiting for CDCLK PLL lock\n"); + DRM_ERROR("timeout waiting for CDCLK PLL lock\n"); dev_priv->cdclk.hw.vco = vco; } diff --git a/drivers/net/ethernet/qlogic/qed/qed_int.c b/drivers/net/ethernet/qlogic/qed/qed_int.c index d3eabcf9c86c..af3a28ec04eb 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_int.c +++ b/drivers/net/ethernet/qlogic/qed/qed_int.c @@ -321,7 +321,7 @@ static int qed_pglub_rbc_attn_cb(struct qed_hwfn *p_hwfn) tmp = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, PGLUE_B_REG_TX_ERR_WR_DETAILS_ICPL); if (tmp & PGLUE_ATTENTION_ICPL_VALID) - DP_INFO(p_hwfn, "ICPL eror - %08x\n", tmp); + DP_INFO(p_hwfn, "ICPL error - %08x\n", tmp); tmp = qed_rd(p_hwfn, p_hwfn->p_dpc_ptt, PGLUE_B_REG_MASTER_ZLR_ERR_DETAILS); diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index 7806a4d2b1fc..718a73c623a7 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -4431,7 +4431,7 @@ void rtl8xxxu_gen1_init_aggregation(struct rtl8xxxu_priv *priv) timeout = page_thresh; else if (rtl8xxxu_dma_agg_pages <= 6) dev_err(&priv->udev->dev, - "%s: dma_agg_pages=%i too small, minium is 6\n", + "%s: dma_agg_pages=%i too small, minimum is 6\n", __func__, rtl8xxxu_dma_agg_pages); else dev_err(&priv->udev->dev, diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c index fde6b6aa86e3..a802bddf04aa 100644 --- a/drivers/scsi/aacraid/src.c +++ b/drivers/scsi/aacraid/src.c @@ -786,7 +786,7 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type) if (!is_ctrl_up) dev_err(&dev->pdev->dev, "IOP reset failed\n"); else { - dev_info(&dev->pdev->dev, "IOP reset succeded\n"); + dev_info(&dev->pdev->dev, "IOP reset succeeded\n"); goto set_startup; } } @@ -808,7 +808,7 @@ static int aac_src_restart_adapter(struct aac_dev *dev, int bled, u8 reset_type) ret = -ENODEV; goto out; } else - dev_info(&dev->pdev->dev, "SOFT reset succeded\n"); + dev_info(&dev->pdev->dev, "SOFT reset succeeded\n"); } set_startup: diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index d09afe1b567d..25d763ae5d5a 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c @@ -1882,7 +1882,7 @@ static int qedi_map_scsi_sg(struct qedi_ctx *qedi, struct qedi_cmd *cmd) bd[bd_count].sge_len = (u16)sg_len; QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_IO, - "single-cashed-sgl: bd_count:%d addr=%llx, len=%x", + "single-cached-sgl: bd_count:%d addr=%llx, len=%x", sg_count, addr, sg_len); return ++bd_count; -- cgit v1.2.3 From bade9835a22e03a00d6cb94350984620bf808f83 Mon Sep 17 00:00:00 2001 From: Johannes Thumshirn Date: Fri, 9 Feb 2018 14:20:45 +0100 Subject: edd: don't spam log if no EDD information is present We've had reports from users being concerned about messages like: [ 4.487246] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found [ 4.487251] EDD information not available. While these are more or less irrelevant, tell edd.c to not annoy anyone. Signed-off-by: Johannes Thumshirn Signed-off-by: Jiri Kosina --- drivers/firmware/edd.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/firmware/edd.c b/drivers/firmware/edd.c index 60a8f1363a10..1b82c89a49df 100644 --- a/drivers/firmware/edd.c +++ b/drivers/firmware/edd.c @@ -748,14 +748,12 @@ edd_init(void) int rc=0; struct edd_device *edev; + if (!edd_num_devices()) + return -ENODEV; + printk(KERN_INFO "BIOS EDD facility v%s %s, %d devices found\n", EDD_VERSION, EDD_DATE, edd_num_devices()); - if (!edd_num_devices()) { - printk(KERN_INFO "EDD information not available.\n"); - return -ENODEV; - } - edd_kset = kset_create_and_add("edd", NULL, firmware_kobj); if (!edd_kset) return -ENOMEM; -- cgit v1.2.3 From b903036aad6c46f0c94b3a58c86f7467776a5dcf Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 2 Mar 2018 14:43:23 +0100 Subject: net: Spelling s/stucture/structure/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Jiri Kosina --- drivers/net/ethernet/ti/tlan.c | 2 +- drivers/net/wireless/atmel/atmel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/ti/tlan.c b/drivers/net/ethernet/ti/tlan.c index 5a4e78fde530..c769cd9d11e7 100644 --- a/drivers/net/ethernet/ti/tlan.c +++ b/drivers/net/ethernet/ti/tlan.c @@ -1901,7 +1901,7 @@ ThunderLAN driver adapter related routines * Nothing * Parms: * dev The device structure with the list - * stuctures to be reset. + * structures to be reset. * * This routine sets the variables associated with managing * the TLAN lists to their initial values. diff --git a/drivers/net/wireless/atmel/atmel.c b/drivers/net/wireless/atmel/atmel.c index c9dd5e44c9c6..d122386c382b 100644 --- a/drivers/net/wireless/atmel/atmel.c +++ b/drivers/net/wireless/atmel/atmel.c @@ -3861,7 +3861,7 @@ static int reset_atmel_card(struct net_device *dev) set all the Mib values which matter in the card to match their settings in the atmel_private structure. Some of these - can be altered on the fly, but many (WEP, infrastucture or ad-hoc) + can be altered on the fly, but many (WEP, infrastructure or ad-hoc) can only be changed by tearing down the world and coming back through here. -- cgit v1.2.3