From patchwork Thu Dec 14 12:10:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 178698 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8494018dys; Thu, 14 Dec 2023 04:11:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDlqzSbOGJGVdgZO1dmU57KU1Y12nd4rUzNgdMcgIRO3e2ZnnoVY5XgZp+DO3T8t6g+jgI X-Received: by 2002:a17:90a:a88f:b0:286:8b15:72a6 with SMTP id h15-20020a17090aa88f00b002868b1572a6mr7579775pjq.47.1702555905888; Thu, 14 Dec 2023 04:11:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702555905; cv=none; d=google.com; s=arc-20160816; b=aYuCKb3TYtICA8v3cjFkFL5KrRf+eytF7/Hq7EHubw0NqJzBuMAk2Vj5LKNbJdkSrQ hOQv3r/4Ku82vR0gqloSbHJKwdLzb7AQvc4z4OJnmREvgqVHiKp/8jH4uXBu7fjKPgjo cLsOP/DXpRLTdTh+qc3KtSdlYutGgyJvPkdwhhDR90OtvZaxOSutJ0PPNWOQCoiFmp9u Dy1HoVB+sDjq/89y2qOm1Q/RwK9ZRd3f7EnOzLPz2rw1FWl10T+C112W3UNGDFqfP3Wd 8g1060VHHCdqyOVyOQPHkMruXb6+ni89Uek5fNsIbh0dxubnKXd7NPuVNRlyIivRhNVz ZjHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=8TzgD0Qs2BVpmH7f8GdD/KOxE3BnUuO973WRXZk0Mqc=; fh=wWo03r2JjWghae2V0hr6u9jTJqCCGGThYJ7k0BaFlTY=; b=SkA4KDhGxEUJis75GazYtY0X49cQ6BYv4k/33xVIP42Lx9Wdd9bSarrgw+yePVLxo7 P67eE1TiLWR+YT81vH9P5wmCSTJqrX0pgtkr5U30TU+oDbbfMS/cMpIGoA9j5h6cob6f 1yHcKGsCl6zQdzpafRWPkYRgBPAh7fX0JJZ1PQXtrlOs/2Rt8fU1wKCm1Nb3QIGVjEJ7 XzS2+wMurY6hiSZAq5E8z/G0iA6zamx4NNpqis3rNJaeL2oNOEWR8HdTVasCRBUfdg+N lSrEVq/9JbGhu/YR8AH1g7nt4zD1N/Uf/yXTxNbQQTKUGdA8nbnz96EkVVWSn/TTC2y7 50rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Zkap/NQq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id w92-20020a17090a6be500b0028694fc7a61si1383982pjj.13.2023.12.14.04.11.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:11:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Zkap/NQq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C0E83814C6A3; Thu, 14 Dec 2023 04:11:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1572929AbjLNMKz (ORCPT + 99 others); Thu, 14 Dec 2023 07:10:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1572934AbjLNMKn (ORCPT ); Thu, 14 Dec 2023 07:10:43 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 252DD10A; Thu, 14 Dec 2023 04:10:50 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-33646d24c1bso484491f8f.2; Thu, 14 Dec 2023 04:10:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702555848; x=1703160648; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=8TzgD0Qs2BVpmH7f8GdD/KOxE3BnUuO973WRXZk0Mqc=; b=Zkap/NQqA2Pemj3D9+t1PkWi5X4YZuLDaxp4yruSTFa+0ugT2GHjyKKTdSUnIkW5v/ vk3NlqXGI084ApBW37hETCF+MXUBvfmCnnKFh/Vvs9mnmeVmErYj0TBha5ISh83UO/wI VGROXr9MISihUqfOBVINN4Aq7SfrDtmB3nyztVlQtGejCamushuR2okGv+8gn/PtaHyH XybVfw11u67RsPu5U+7j/X5IZNwCKvvyim8GF6wY0TWWvrRgXkO2GcHB3lRLdqz1xnaz vobeWCFj+6rsjoHJB4hLCy6uYjT+yls7y8QjJfiwR5Hu/HNJKrKkIl2ptfbaT00sxoLB YYxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702555848; x=1703160648; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8TzgD0Qs2BVpmH7f8GdD/KOxE3BnUuO973WRXZk0Mqc=; b=pnE7L3RXQqidn+inArpbllJ5VyzOLs0hvgkQ+pTn1SY4lZ8BBUN5hjNygPqbe9WVRG FzJGEmztft3PG+ed062e2ikA2ILelGS6VVHlvqnQV7MPmefdbmHWgTXvwnuAonXaztnh quTq/e86qElOvxgLhclAIRNJ2vsljur7gj1IEx+ZiFASkLqFhXuzyxnUJXZ6/QYsecDS iy1skCZKDnpg72if4fNcIclJnDEWJ753qe76HSROgLTBxP90aLE1/mc2i+dl6ZQBKiA5 tg2yujxF28BUBepNwQEoeEaMf84jZTPzngEcI4mC/BY8Wg+TcInaC8uAKfSyf6UtvcOT 97DQ== X-Gm-Message-State: AOJu0YwRrUB4sGw0Ae7s0ljts53eTkbnvfzrgelsHbGTjxEXyqg4fRYc fM4Q6LWRe5nfNIFlbFS46/M= X-Received: by 2002:a5d:650d:0:b0:336:3db7:6e3e with SMTP id x13-20020a5d650d000000b003363db76e3emr1214199wru.96.1702555848265; Thu, 14 Dec 2023 04:10:48 -0800 (PST) Received: from localhost.localdomain (93-34-89-13.ip49.fastwebnet.it. [93.34.89.13]) by smtp.googlemail.com with ESMTPSA id d12-20020adfa40c000000b003333fa3d043sm16026765wra.12.2023.12.14.04.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:10:47 -0800 (PST) From: Christian Marangi To: Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , David Epping , "Russell King (Oracle)" , Christian Marangi , Harini Katakam , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net-next PATCH v7 1/4] net: phy: make addr type u8 in phy_package_shared struct Date: Thu, 14 Dec 2023 13:10:23 +0100 Message-Id: <20231214121026.4340-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231214121026.4340-1-ansuelsmth@gmail.com> References: <20231214121026.4340-1-ansuelsmth@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Dec 2023 04:11:19 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785259261631318523 X-GMAIL-MSGID: 1785259261631318523 Switch addr type in phy_package_shared struct to u8. The value is already checked to be non negative and to be less than PHY_MAX_ADDR, hence u8 is better suited than using int. Signed-off-by: Christian Marangi Reviewed-by: Russell King (Oracle) --- Changes v7: - Add this patch include/linux/phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/phy.h b/include/linux/phy.h index e5f1f41e399c..e5e29fca4d17 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -338,7 +338,7 @@ struct mdio_bus_stats { * phy_package_leave(). */ struct phy_package_shared { - int addr; + u8 addr; refcount_t refcnt; unsigned long flags; size_t priv_size;