Message ID | 20240119072729.54499-1-jiapeng.chong@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-30841-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp845575dyb; Thu, 18 Jan 2024 23:28:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxsWrrrdkeDTM53MST1Z3f/YlPIV2uq/gyPfLtsqWYQkkNxKhWk5sIt2sJgCVZvAPKI2Y2 X-Received: by 2002:a2e:8e98:0:b0:2cd:7831:3ca2 with SMTP id z24-20020a2e8e98000000b002cd78313ca2mr1184509ljk.84.1705649290408; Thu, 18 Jan 2024 23:28:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705649290; cv=pass; d=google.com; s=arc-20160816; b=ZYL2V3xwTipf9t9A213Yevx7IqqgI49YtWN53fQcw0Jfl38O6eI7QcRrHiNFZokgHi U0kqquMJGWnmbQnd7Yx1BrEm6FU3qwaF3Is7opXXS7Ah2dV9jgD8MtbEs+/kHtA/gtwU 9xfh1lQV9tBD0pAiGE+sTJ5Fmgzp/c+gwokuQ8Q0gHELSzZHqp2ruLzYn+CYj/dL9DdW /gP7KLyZ+0MMysnejW2ULACQWd2SXrNMbuMPnnosd6NrORsO1u3sU1UY9TulJ9KP7J+6 rRC4odLXBDcPe5FgqhmLNdGu0WPlOyG9+GHjhvlFulqWJRr4beZ2qum6L0i7uN2E5kmA vh/g== 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:message-id:date:subject:cc:to :from; bh=RNPoPYutYV+xKz8QdfB+f24QUR6mAIEy0d3ANHxpcw8=; fh=4bIASKU3NFziDS0H7a+aOgXVoYB+1JLqf7N8EGa4KbQ=; b=CnFmQZtxMDl4Hx2TekyfcLCIPJPEHTfdCJYTKYXKgyFAxIPKoz/SCjpgoRXRN864nC DykFEQjbUEuKU7K3hKqKqSjRjUnohpSNVe7TYD2ncDTTtAx8LRg6rI9MIGFtrQsFim3R ElmfmLnDOvvrSDtFuK404ZriULgiOP4Y3XlMlDn839G8TrSkDsPqWrCYwlmd/C+C7JyQ 76qouIwqaxLv0as90C2Rd5lYINcK+Bwam2cWu/iv+FGE5Piu2kN3/5vCletzsOsDYYhR qWsGZ4C7Y+FRJmRUtAoRFqTFpAhmA3QJCahE/daD4mIbhWqrfN+5PgDJEDmUTPGqLbiA B6qA== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-30841-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30841-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c20-20020aa7d614000000b00559c4287ea0si2863750edr.533.2024.01.18.23.28.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 23:28:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30841-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-30841-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30841-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id D98F61F23B66 for <ouuuleilei@gmail.com>; Fri, 19 Jan 2024 07:28:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38B71D536; Fri, 19 Jan 2024 07:27:55 +0000 (UTC) Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (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 1306F138F; Fri, 19 Jan 2024 07:27:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.100 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705649273; cv=none; b=R3J9UDEY0wcR4kJJ7ijHbAHapQU9RZ3v3DSS6u532X4n/xYwnNrbJzrrhswfOgBXt+GOs1O2wTZdeNRYy7gRBSvUUmhu3JuqMAL7AxJ8wo1OjGWodoPmnYPqrXXrO33LqNv/ZOnwA6BU8Avib04jmkbG8VI7y1Ijpe78hXWG7RM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705649273; c=relaxed/simple; bh=k4zY6zSfiVrGSgWwEbgj3i1uxtZL9Q19dTH4gm4sUnM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=oR0Y4q+Pk0n6a6yqxlg79mu+FxjajpfCAkWoZvLLbfancxyuRaTjXgI0ZPEDDmdBmUEDlk+kEDe2T7wQJgPmS9ruM8NugA560P2VHyIeAuf+zdgCC9ws4zHG6s08c60oGL+A7lvnm2qFviKtFHFDlwrO0NcnfVzQ4OkxBOIYp1A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; arc=none smtp.client-ip=115.124.30.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R831e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045170;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0W-vEN39_1705649251; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0W-vEN39_1705649251) by smtp.aliyun-inc.com; Fri, 19 Jan 2024 15:27:41 +0800 From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> To: djogorchock@gmail.com Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, Abaci Robot <abaci@linux.alibaba.com> Subject: [PATCH] HID: nintendo: Remove some unused functions Date: Fri, 19 Jan 2024 15:27:29 +0800 Message-Id: <20240119072729.54499-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788502910398659501 X-GMAIL-MSGID: 1788502910398659501 |
Series |
HID: nintendo: Remove some unused functions
|
|
Commit Message
Jiapeng Chong
Jan. 19, 2024, 7:27 a.m. UTC
These functions are defined in the hid-nintendo.c file, but not called
elsewhere, so delete these unused functions.
drivers/hid/hid-nintendo.c:670:20: warning: unused function 'joycon_device_is_left_joycon'.
drivers/hid/hid-nintendo.c:674:20: warning: unused function 'joycon_device_is_right_joycon'
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7992
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/hid/hid-nintendo.c | 10 ----------
1 file changed, 10 deletions(-)
Comments
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> wrote: > These functions are defined in the hid-nintendo.c file, but not called > elsewhere, so delete these unused functions. > > drivers/hid/hid-nintendo.c:670:20: warning: unused function 'joycon_device_is_left_joycon'. > drivers/hid/hid-nintendo.c:674:20: warning: unused function 'joycon_device_is_right_joycon' > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7992 > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> > --- > drivers/hid/hid-nintendo.c | 10 ---------- > 1 file changed, 10 deletions(-) Reviewed-by: Silvan Jegen <s.jegen@gmail.com> > > diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c > index ccc4032fb2b0..7ce6be0a8dee 100644 > --- a/drivers/hid/hid-nintendo.c > +++ b/drivers/hid/hid-nintendo.c > @@ -667,16 +667,6 @@ struct joycon_ctlr { > * These helpers are most useful early during the HID probe or in conjunction > * with the capability helpers below. > */ > -static inline bool joycon_device_is_left_joycon(struct joycon_ctlr *ctlr) > -{ > - return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_JOYCONL; > -} > - > -static inline bool joycon_device_is_right_joycon(struct joycon_ctlr *ctlr) > -{ > - return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_JOYCONR; > -} > - > static inline bool joycon_device_is_procon(struct joycon_ctlr *ctlr) > { > return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_PROCON;
On Fri, 19 Jan 2024, Jiapeng Chong wrote: > These functions are defined in the hid-nintendo.c file, but not called > elsewhere, so delete these unused functions. > > drivers/hid/hid-nintendo.c:670:20: warning: unused function 'joycon_device_is_left_joycon'. > drivers/hid/hid-nintendo.c:674:20: warning: unused function 'joycon_device_is_right_joycon' > > Reported-by: Abaci Robot <abaci@linux.alibaba.com> > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7992 > Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Applied, thanks.
diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c index ccc4032fb2b0..7ce6be0a8dee 100644 --- a/drivers/hid/hid-nintendo.c +++ b/drivers/hid/hid-nintendo.c @@ -667,16 +667,6 @@ struct joycon_ctlr { * These helpers are most useful early during the HID probe or in conjunction * with the capability helpers below. */ -static inline bool joycon_device_is_left_joycon(struct joycon_ctlr *ctlr) -{ - return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_JOYCONL; -} - -static inline bool joycon_device_is_right_joycon(struct joycon_ctlr *ctlr) -{ - return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_JOYCONR; -} - static inline bool joycon_device_is_procon(struct joycon_ctlr *ctlr) { return ctlr->hdev->product == USB_DEVICE_ID_NINTENDO_PROCON;