Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2338660lqo; Mon, 20 May 2024 02:42:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQBHuk2tQ9PN8FhOxp2aavctAqZhuffDh8pTB/4ouOQ23o4htGZRzIwx2cwXCqJ79Sidr+mo6nTjW6Kh0wwKGegvbYkTrh1hpaSrSrlg== X-Google-Smtp-Source: AGHT+IGbgXQDbbgyvIYP410Vgwo5v14QexVKoaDSZFvH/PR8QGDLbj0RHEz0flg8dpDC1VRgc5FB X-Received: by 2002:a05:620a:5a54:b0:792:9bf6:fca1 with SMTP id af79cd13be357-792c75f1eb3mr2794762285a.60.1716198126730; Mon, 20 May 2024 02:42:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716198126; cv=pass; d=google.com; s=arc-20160816; b=v5eF1iReOGfdKFHYn4lw1GeHngd3ov7YfvUPXrDiIyEfS9jJth1gBjF56piHvmQdxd 8Zvd4dSecmIXhZn8/HaRMTfoR8Jzx0GG72AaoJtfRy8ekKQHcO2IwFLgQYrEIdSIfaNU ES/XuBXFXWQjnOAdFx5kheM6KP+rt6p02/Nv4XmixLmAMW4LYwY+XdIAvxlVv1EWjLp+ cr2znbclolQrQoYgJdDhI0JrwL7jb3O6EZZDFYuWNBr3dshMbotW4sHJTqbsYcFMY4Do wGeAl4+64VRiSJVBLGNNMvk73MSjmilczfRdabSHuLtOpn7bvS6keGDhz2tIvqQUCz9I 8gLA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language:cc:to :subject:user-agent:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:date:message-id; bh=Trk7UvXRdiu5EbbvG3hvuo0tpWMw3F6op1TtQ53p65U=; fh=tQH4u9MEh1+JORQcjYMPlHEtE1rlqTRQ7ZMV6KUitGw=; b=f1//p/pnlUjhOxBMESvvERXhbPztzA4FZv7Ps6+Q9q5KlynSwKb2Wb65RESw0tx4QI 54yQHReNmlFIfJscfg8qXjFUEMaf36fQDMSAZYwQ1D4v0EGHyG1I2eJYSnZLbEbmo2u1 CinaoPiFAYe78Iw49n/rXDh4eIrHj6Kkkp6jCk8AIfVaIvjRJbLhaPSlmZ+IAxLE05GO MR5HQYXR2/LR/rE1Ywo8FXdvQiaFB2znSKicOa0bPgxZdTHwXgkooH7T7HS8o95t2KEX HcdW2lEdarbp0eNYQwW6aVT/abR9mD21ip/SH4Hr6Is71a9ikBl7e1ygkilE1usHeK+Z CK2A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4800-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-792bf30b791si13450485a.370.2024.05.20.02.42.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 02:42:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-4800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=nfschina.com); spf=pass (google.com: domain of linux-bluetooth+bounces-4800-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-4800-linux.lists.archive=gmail.com@vger.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 B19491C219F2 for ; Mon, 20 May 2024 09:42:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C98A22EF5; Mon, 20 May 2024 09:41:59 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail.nfschina.com (unknown [42.101.60.195]) by smtp.subspace.kernel.org (Postfix) with SMTP id 9C74B200CB; Mon, 20 May 2024 09:41:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=42.101.60.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198118; cv=none; b=TNeiP4uVF1Fru+DVhY8zHNQT7CJFuWlA3rBifqZ5WPf3NDBt4FcUafQQERl4+7Xd1hXrSxQHeIZLEmM42HRDs8G3ZebnYh59vp48gf8OY49bnMSbu9v/LIcYWzmvrtHOOyqOOv7FB2uCsvhq0EiEtDqbJOMuZnkTknV1WeolKbs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716198118; c=relaxed/simple; bh=MSwJRE4bNdzB4NsI2nyECb0QTcxBA2yfxV2+VmIveKg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To: Content-Type; b=LTUm9JLfumWBJq4kVFauPf08wVcntioDnI5r/697wQ6jsfScp+rJQkGPyS82QDAUugmrWJ9R3OIzUbIO1MBHaZfQ4oQz/fe0WUK1x8oKNDwqvmR4OJ5+yIEIidEYZ8HRzduwFa3WxlRpB5WePTF0+OIatx1d9G5PZqZSKg1Llik= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com; spf=pass smtp.mailfrom=nfschina.com; arc=none smtp.client-ip=42.101.60.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nfschina.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nfschina.com Received: from [172.30.20.101] (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPSA id 32A546028428D; Mon, 20 May 2024 17:41:50 +0800 (CST) Message-ID: <317ee58d-b435-0d79-cc57-ea28ae0fff3f@nfschina.com> Date: Mon, 20 May 2024 17:41:49 +0800 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Subject: Re: [PATCH 1/2] Bluetooth: btintel: remove useless code in btintel_set_dsm_reset_method To: Paul Menzel Cc: marcel@holtmann.org, luiz.dentz@gmail.com, nathan@kernel.org, ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, kernel-janitors@vger.kernel.org Content-Language: en-US X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui In-Reply-To: <28196c54-3c65-4646-84f6-76da79368f8e@molgen.mpg.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/5/20 13:12, Paul Menzel wrote: > Dear Su, > > > Thank you for your patch. Some minor comments. > > > Am 20.05.24 um 04:16 schrieb Su Hui: >> Clang static checker(scan-build) warning: > > Please add a space before (. Noting the version of scan build would > also be nice. Sure, I will add this in v2 patch. By the way, the scan-build's version is llvm-17.0. > >> drivers/bluetooth/btintel.c:2537:14: >> Value stored to 'handle' during its initialization is never read. >> >> No need to repeatedly assign values to 'handle'. Remove this useless >> code to save some space. > > The plural “values” is misleading to me. Maybe just remove the > sentence, and say: > > Remove this unused assignment. > > For the summary, “useless code” could also be more specific: > > Bluetooth: btintel: Remove unused assignement in > btintel_set_dsm_reset_method() Yes, it's better for me. > > Maybe also add a Fixes: tag. It's a cleanup not a bug fixing, so I think Fixes: tag is unnecessary. Thanks for you suggestions! I will send v2 patch after the CI tests done. Su Hui > > >> --- >>   drivers/bluetooth/btintel.c | 2 -- >>   1 file changed, 2 deletions(-) >> >> diff --git a/drivers/bluetooth/btintel.c b/drivers/bluetooth/btintel.c >> index 0c855c3ee1c1..f1c101dc0c28 100644 >> --- a/drivers/bluetooth/btintel.c >> +++ b/drivers/bluetooth/btintel.c >> @@ -2542,8 +2542,6 @@ static void btintel_set_dsm_reset_method(struct >> hci_dev *hdev, >>           RESET_TYPE_VSEC >>       }; >>   -    handle = ACPI_HANDLE(GET_HCIDEV_DEV(hdev)); >> - >>       if (!handle) { >>           bt_dev_dbg(hdev, "No support for bluetooth device in ACPI >> firmware"); >>           return;