From patchwork Fri Jan 26 07:54:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiapeng Chong X-Patchwork-Id: 192443 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp533702dyb; Fri, 26 Jan 2024 01:06:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOF55f9VB3kI1HiHzXVYOvQ3vknC89FtFduYISJvUcZIBBEO8offr8LmxLMTWHsft3T1vE X-Received: by 2002:a05:6808:171a:b0:3bd:9857:9ae9 with SMTP id bc26-20020a056808171a00b003bd98579ae9mr1277985oib.34.1706260005911; Fri, 26 Jan 2024 01:06:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706260005; cv=pass; d=google.com; s=arc-20160816; b=mv2vB2JoBxYca0S04Ms++You0vsqOioUBrG2eBXsVz9INpgHN2/gC769Db18LzEcQm hv9Rxpe3wLFvfKtopGVzMEpZ0sagkvMNbDubjouh9rLlf26j1pJHz5vNiSwM3xig38oh z9EsQLifPa0fUl7CrERxpGQkVli2IxnyBVuhG9M/kFXeDU6cd0QM2QxWyPVGEtiTVL+d 0bseQPNz8r7zP76pXuufUuccm7LW/PyBdTdX0zIDBDR0uy3t20BLkPjt8F/l6wwlij+t GacSnoa1+IGb4FaO3nHVd6HBMlV0uxHNrYFoIIgfej8lGRnILWtEOtFZk79h+9pyDRXC IGnQ== 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:dkim-signature; bh=MNOY8Q5NDwaHI6XaoJ0LQ9C0/crVlCsDYm9O0vJ51+M=; fh=4bIASKU3NFziDS0H7a+aOgXVoYB+1JLqf7N8EGa4KbQ=; b=MttsZI5KCKIkef7F9uyfVLO5w84AU0iRLDVJ81cHJQep0cBBFHArPAlCGiPQyzliiZ AqvxixgqG6QNs27bc8S2eMGwIGeZRtDCpcGmyeCN3uWZg16PIFZel77JPiAnLovYOUUr nlhd6ooEVUTHtoe5kD4e5W2sEbRRrHHN8JrlBuTh3CYYkWmWamLF5DUamkGUA0x586sd PC5Jj6CwNqD3M0+WJ+f1tdkJv56uQuvabUlz3s+YXzt1zRbODelCiGZTkJ5wttI59TKf X97zX3bCEl1aBnzgqQfUNfEs0wEJrzNKLPySOWNeYUiw3yvh6NbZLytFIisiAOL0MC3L 2EDw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b="f7tQ/Z9t"; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-39726-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39726-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.alibaba.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m16-20020a637d50000000b0057745d87b50si777012pgn.139.2024.01.26.01.06.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 01:06:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39726-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.alibaba.com header.s=default header.b="f7tQ/Z9t"; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dkim=pass dkdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-39726-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39726-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 2754C287ECD for ; Fri, 26 Jan 2024 09:06:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69B68627F4; Fri, 26 Jan 2024 07:55:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="f7tQ/Z9t" Received: from out30-124.freemail.mail.aliyun.com (out30-124.freemail.mail.aliyun.com [115.124.30.124]) (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 B06BC125DB; Fri, 26 Jan 2024 07:55:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706255707; cv=none; b=iy4IH1EPpBVFodZxMQ39Gmf9HI5dXjQGHueAh/QIQuxdntzEtL6XF0fvX7EDMkuVdToiiB4ZKTq3Qx1AA6tfiNAgeQR5XG2Agio64DObg/p2dZ/cawT8ptLzq1EFmNhJKyE/Ww8FivIUwRjlnzPYAf2cmUorGeo9xB09/u2hp2M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706255707; c=relaxed/simple; bh=PLcDYGc3A3KbkeSJVUSvsPSMylDJVowTLRFbic23reM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=M3085clUgDLVWZRmu+GrdZqG0KrdLvSHqRglFRKzQQA/Rf6Llq26jmFGL6PXh/qAZl4NLZQ+JoQ6zG+YweFoTe3poGPaz90H95qVs+oZda4l0EYJWgCLqw2QRcskA2y8ptiYeoeEXFxbooqPH53lvwDPFIBQoVjINxckXPeE5fc= 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; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=f7tQ/Z9t; arc=none smtp.client-ip=115.124.30.124 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1706255695; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=MNOY8Q5NDwaHI6XaoJ0LQ9C0/crVlCsDYm9O0vJ51+M=; b=f7tQ/Z9t9WKGeoWCxIPSBXoRZNDIwd6ZCDolGCz3ixx4fPdm6o+iBQ7QBfkNn2VPNYd4eyXWIhw1gJmo+eGkc2jWLAb6jMsx7ZVk9RRNV0SDZh1ELhtMvzw4Z5W201q/HSh6NygWV6W4uhiRP9njtSc2ECSCyHM0YoxmWv465Pc= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0W.MzF4n_1706255688; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0W.MzF4n_1706255688) by smtp.aliyun-inc.com; Fri, 26 Jan 2024 15:54:54 +0800 From: Jiapeng Chong To: djogorchock@gmail.com Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] HID: nintendo: Remove some unused functions Date: Fri, 26 Jan 2024 15:54:45 +0800 Message-Id: <20240126075445.15495-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: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789143291781813576 X-GMAIL-MSGID: 1789143291781813576 These functions are defined in the hid-nintendo.c file, but not called elsewhere, so delete these unused functions. drivers/hid/hid-nintendo.c:757:20: warning: unused function 'joycon_type_has_left_controls'. drivers/hid/hid-nintendo.c:763:20: warning: unused function 'joycon_type_has_right_controls'. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8060 Signed-off-by: Jiapeng Chong --- drivers/hid/hid-nintendo.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c index 7ce6be0a8dee..ab5953fc2436 100644 --- a/drivers/hid/hid-nintendo.c +++ b/drivers/hid/hid-nintendo.c @@ -754,18 +754,6 @@ static inline bool joycon_type_is_right_nescon(struct joycon_ctlr *ctlr) return ctlr->ctlr_type == JOYCON_CTLR_TYPE_NESR; } -static inline bool joycon_type_has_left_controls(struct joycon_ctlr *ctlr) -{ - return joycon_type_is_left_joycon(ctlr) || - joycon_type_is_procon(ctlr); -} - -static inline bool joycon_type_has_right_controls(struct joycon_ctlr *ctlr) -{ - return joycon_type_is_right_joycon(ctlr) || - joycon_type_is_procon(ctlr); -} - static inline bool joycon_type_is_any_joycon(struct joycon_ctlr *ctlr) { return joycon_type_is_left_joycon(ctlr) ||