Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2088250lqb; Mon, 27 May 2024 07:31:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW3hKRpFOh46o44dTyy4+5r/DfZOnS6ft9IrEJdBLG4nz5OzkeF1nfbaYeF1gvWDjMqit6BihfLsuxxiUHDiC1NkX8nKA9Q5lZshJelCw== X-Google-Smtp-Source: AGHT+IEM3M+88MpuGjefbt4qx18KVAfa67OuQqzxso5PR8Unt03ndg0YI1NP9t5NbKZ/JShS68QL X-Received: by 2002:ae9:f509:0:b0:793:a24:2142 with SMTP id af79cd13be357-794ab13e88fmr1001760785a.70.1716820292551; Mon, 27 May 2024 07:31:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716820292; cv=pass; d=google.com; s=arc-20160816; b=m4vluJlhvRC2JQbjzCL6/bE14iUMKiM4TMRZ7tLuBcno3ew5uMgpn4y6g1/e4HID4P 8mPpPQ73nCxN6yvubZlPIlZwqEHb9Hbjd0CBVXmTvGjrFj/Zg+E8kIsD4u1yeRw8lWao qVoO7sKuZlYODyosWLAKYp8TLqt5G1YhFNg+G9jVi3pnVeORHaPijxB6D0tNAInyNxdW riP6JjpNh3vZeU3Wr71H50UIl0Mg6P4+V+WM3kRqAl+2GGlJ1Gn3b1jimrzquDVd2tYj Cx+8f5RERsr4df4Jq1/fZIqOFm/UQ2JiWIgqUpsoPFr4pjfS4AmDV+tuXmHrPHEQzvfW RzJA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5EplDCC35mGno1dZZcHhVnts0n4XsBoGWkQdUy/X1/g=; fh=K9ep9+N1LzXt5vzQnHgjio+czShM0uiT8BewBAccyC4=; b=IQnsBuoqNJj9fAzSHOVE/a7bzqx8qQIADL1jJqKCeeOZXcztl4Bm0F+Ym2slycY/Ce RQ/ob5ceNNtvHy1MYqHn1VKfjB9xZ8nKMx8YTfrS/u/GsnJF2O6MR037kvZ0mMLOZYQ0 biJttGxL4FtAuByXVUx+uWuQ9M02awuB59w9eT1EQpq1mmOv88GjsBjVam1c8PUK7CXP T1OHP1ObsW6HwmNNTwep+sWmZJEljQVuK7VE1n5JnmSTe71fNhV2nDf1fhgPWLRWKE1H 0i10y1WMvW7tofG49GmoaTHb6BkX03YvDamQ/v92yKzL+6N2+rLu5g/IhipFFIm+7C5B 4TvA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qaNRgyYm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-190873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794abd142e2si859378685a.351.2024.05.27.07.31.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 07:31:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qaNRgyYm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-190873-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190873-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 39E921C212A1 for ; Mon, 27 May 2024 14:31:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DB351836DB; Mon, 27 May 2024 14:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qaNRgyYm" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11FC916C451; Mon, 27 May 2024 14:15:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819332; cv=none; b=MYG7Udq1jsQTwkdyLiLFMYy/NWlmMKJaasxHcb2Sfyr4nG+9llhUHG8N8VMDQY6XY2yzwQPrP2Sv8AS1VfAVNWnO+mWNjhyMX4GNnq0vk6KTQIk3qZ6YJCzImteXF3dkhhG2Q/zYamHUlU4ZheCgrQf6y651LgWn0s5ZM+tb0AQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716819332; c=relaxed/simple; bh=UUX6FM7FevEjcmk/Q+b3AHxsD6DcfXw/QHAtxiCn7Kc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gn+my+LRfsr/phxncgRXwn/yY9R4Zhe5LiTvvdPMemtigNCZ59Y2Cl796UxBBn+i4qZi39Db9k29+hKMq5SX7MPsXY7y4m3xM5VhWKoKO11cryA0Wz/oFX0kSCsp6e79DuiRhCpLBxZJEE0Fj+nN9BH1tdr46mfAvc2dv8JQrPc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qaNRgyYm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6728C4AF08; Mon, 27 May 2024 14:15:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716819331; bh=UUX6FM7FevEjcmk/Q+b3AHxsD6DcfXw/QHAtxiCn7Kc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qaNRgyYmxTegceBTF3oSqlDfnYqx2VX9xYx4cmfMs9MZAaGyIwQdl9Mj0TdaOB+7r JTq0XIj90YUkkHk6jdVFahpHOUOdhnQGgVmyl5cEOfErA1xn7t5l9lswFXujccZobl 3QUgkUBb8B7Y7p9bAkcsvl4SCmO0EShEWMkvHXRiUDKzaHK3YeyZ3hXTtDpffQFrz5 A7mBn9Te742/g7EcJ0WEzWCJoBOLpWtKBbySvQb7KtC5llQ9jcvhehis4baw1xC9q4 r9o2nejqwfamiTeUGQCKYxozxCz0eKaGk/wNVw5KUQz2ZmNEfRP8RL4MV9xL8bEbh0 xdbS72O4Pju+w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Uri Arev , Luiz Augusto von Dentz , Sasha Levin , marcel@holtmann.org, luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org Subject: [PATCH AUTOSEL 6.8 30/30] Bluetooth: ath3k: Fix multiple issues reported by checkpatch.pl Date: Mon, 27 May 2024 10:13:39 -0400 Message-ID: <20240527141406.3852821-30-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240527141406.3852821-1-sashal@kernel.org> References: <20240527141406.3852821-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.8.11 Content-Transfer-Encoding: 8bit From: Uri Arev [ Upstream commit 68aa21054ec3a1a313af90a5f95ade16c3326d20 ] This fixes some CHECKs reported by the checkpatch script. Issues reported in ath3k.c: ------- ath3k.c ------- CHECK: Please don't use multiple blank lines + + CHECK: Blank lines aren't necessary after an open brace '{' +static const struct usb_device_id ath3k_blist_tbl[] = { + CHECK: Alignment should match open parenthesis +static int ath3k_load_firmware(struct usb_device *udev, + const struct firmware *firmware) CHECK: Alignment should match open parenthesis + err = usb_bulk_msg(udev, pipe, send_buf, size, + &len, 3000); CHECK: Unnecessary parentheses around 'len != size' + if (err || (len != size)) { CHECK: Alignment should match open parenthesis +static int ath3k_get_version(struct usb_device *udev, + struct ath3k_version *version) CHECK: Alignment should match open parenthesis +static int ath3k_load_fwfile(struct usb_device *udev, + const struct firmware *firmware) CHECK: Alignment should match open parenthesis + err = usb_bulk_msg(udev, pipe, send_buf, size, + &len, 3000); CHECK: Unnecessary parentheses around 'len != size' + if (err || (len != size)) { CHECK: Blank lines aren't necessary after an open brace '{' + switch (fw_version.ref_clock) { + CHECK: Alignment should match open parenthesis + snprintf(filename, ATH3K_NAME_LEN, "ar3k/ramps_0x%08x_%d%s", + le32_to_cpu(fw_version.rom_version), clk_value, ".dfu"); CHECK: Alignment should match open parenthesis +static int ath3k_probe(struct usb_interface *intf, + const struct usb_device_id *id) CHECK: Alignment should match open parenthesis + BT_ERR("Firmware file \"%s\" not found", + ATH3K_FIRMWARE); CHECK: Alignment should match open parenthesis + BT_ERR("Firmware file \"%s\" request failed (err=%d)", + ATH3K_FIRMWARE, ret); total: 0 errors, 0 warnings, 14 checks, 540 lines checked Signed-off-by: Uri Arev Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- drivers/bluetooth/ath3k.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index 88262d3a93923..ce97b336fbfb8 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c @@ -3,7 +3,6 @@ * Copyright (c) 2008-2009 Atheros Communications Inc. */ - #include #include #include @@ -128,7 +127,6 @@ MODULE_DEVICE_TABLE(usb, ath3k_table); * for AR3012 */ static const struct usb_device_id ath3k_blist_tbl[] = { - /* Atheros AR3012 with sflash firmware*/ { USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 }, { USB_DEVICE(0x0489, 0xe04d), .driver_info = BTUSB_ATH3012 }, @@ -202,7 +200,7 @@ static inline void ath3k_log_failed_loading(int err, int len, int size, #define TIMEGAP_USEC_MAX 100 static int ath3k_load_firmware(struct usb_device *udev, - const struct firmware *firmware) + const struct firmware *firmware) { u8 *send_buf; int len = 0; @@ -237,9 +235,9 @@ static int ath3k_load_firmware(struct usb_device *udev, memcpy(send_buf, firmware->data + sent, size); err = usb_bulk_msg(udev, pipe, send_buf, size, - &len, 3000); + &len, 3000); - if (err || (len != size)) { + if (err || len != size) { ath3k_log_failed_loading(err, len, size, count); goto error; } @@ -262,7 +260,7 @@ static int ath3k_get_state(struct usb_device *udev, unsigned char *state) } static int ath3k_get_version(struct usb_device *udev, - struct ath3k_version *version) + struct ath3k_version *version) { return usb_control_msg_recv(udev, 0, ATH3K_GETVERSION, USB_TYPE_VENDOR | USB_DIR_IN, 0, 0, @@ -271,7 +269,7 @@ static int ath3k_get_version(struct usb_device *udev, } static int ath3k_load_fwfile(struct usb_device *udev, - const struct firmware *firmware) + const struct firmware *firmware) { u8 *send_buf; int len = 0; @@ -310,8 +308,8 @@ static int ath3k_load_fwfile(struct usb_device *udev, memcpy(send_buf, firmware->data + sent, size); err = usb_bulk_msg(udev, pipe, send_buf, size, - &len, 3000); - if (err || (len != size)) { + &len, 3000); + if (err || len != size) { ath3k_log_failed_loading(err, len, size, count); kfree(send_buf); return err; @@ -425,7 +423,6 @@ static int ath3k_load_syscfg(struct usb_device *udev) } switch (fw_version.ref_clock) { - case ATH3K_XTAL_FREQ_26M: clk_value = 26; break; @@ -441,7 +438,7 @@ static int ath3k_load_syscfg(struct usb_device *udev) } snprintf(filename, ATH3K_NAME_LEN, "ar3k/ramps_0x%08x_%d%s", - le32_to_cpu(fw_version.rom_version), clk_value, ".dfu"); + le32_to_cpu(fw_version.rom_version), clk_value, ".dfu"); ret = request_firmware(&firmware, filename, &udev->dev); if (ret < 0) { @@ -456,7 +453,7 @@ static int ath3k_load_syscfg(struct usb_device *udev) } static int ath3k_probe(struct usb_interface *intf, - const struct usb_device_id *id) + const struct usb_device_id *id) { const struct firmware *firmware; struct usb_device *udev = interface_to_usbdev(intf); @@ -505,10 +502,10 @@ static int ath3k_probe(struct usb_interface *intf, if (ret < 0) { if (ret == -ENOENT) BT_ERR("Firmware file \"%s\" not found", - ATH3K_FIRMWARE); + ATH3K_FIRMWARE); else BT_ERR("Firmware file \"%s\" request failed (err=%d)", - ATH3K_FIRMWARE, ret); + ATH3K_FIRMWARE, ret); return ret; } -- 2.43.0