Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1467289rwl; Fri, 24 Mar 2023 10:53:15 -0700 (PDT) X-Google-Smtp-Source: AKy350YZdTsOc5MgjHRmVSIjdRA9hCwVKq1PZFQDaU7m1I2ZCtB8q4I/Z+bBwl9iapLqhjOgYS1v X-Received: by 2002:a17:903:886:b0:1a1:bcaa:aaea with SMTP id kt6-20020a170903088600b001a1bcaaaaeamr3197895plb.3.1679680395702; Fri, 24 Mar 2023 10:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679680395; cv=none; d=google.com; s=arc-20160816; b=Hm2qXIXIzMlRMbE+PYGw6PK95Iv+I8GkdUSUIHRVXFvlOttrtJ1MPjk7qROXdXfDkb Yhb12biY9ixRG9Ayprz2N2vu93hdXdzZEslWitCMNwfERcVnROkLDIB+N4hwc2Kbv3u/ u44VslgUSAX/ybWVh5eXqylflh2BjHR+wc/G6DIkDib75nBcCWNAT06Nf4qNYcVJ4/o6 tbP5NiVEIt+jw8iEtK1PNuXsyjV19ogBhwv3TsR4t62IkGmqpoXa4JQ3eEEged9uKnDu xyx5GKszyj4PCGv09ho1BiaVpUZnx59RkvTznGRSeUjwrm7/JA7SxqdSDka/tGW+x11k GHdA== 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:cc:to:from :dkim-signature; bh=PuV3IriHAW7aZC8rFN25zhcR9dc8l3Vh+GPx6NtpMpU=; b=LyYJ9WefYuvJ8+49hHGoYBpZ9JD8oIqhI7PvJL1aCYzm/FxF9P0H/Yq8NdWI7KWyMW Gp+b1LHyRgI8yMTHcZBCqinHkBO0g134556a40g+Z8pXqkA7zTLBhKEzA9Hmh6jyDwPi DlKVymKjF8rOSrpbeY4NGSv+savHVusarO/gxvEsJycuWHVt5FwN5wfSLR7cIM02Ygeg T+eIQ9mMbnS6khLhy1EXYZCu+VS9kesIAED3g2jk6DG7fu2KwN79faikqFvdgG+WYwrx +siBHpoRVsitq9iIk4lbFdzNfEkGcIMcWt6GuZjAJ+dcxvwEmbxFUtUXj9gRz8FTjCsk v3pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eRtC81NE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j36-20020a634a64000000b005030eb175d1si10813470pgl.107.2023.03.24.10.53.04; Fri, 24 Mar 2023 10:53:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eRtC81NE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232027AbjCXRwq (ORCPT + 99 others); Fri, 24 Mar 2023 13:52:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbjCXRwO (ORCPT ); Fri, 24 Mar 2023 13:52:14 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34924CDD3; Fri, 24 Mar 2023 10:51:50 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id n2so2227891qtp.0; Fri, 24 Mar 2023 10:51:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679680307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PuV3IriHAW7aZC8rFN25zhcR9dc8l3Vh+GPx6NtpMpU=; b=eRtC81NEQErSKAXM26X0ZVcHMgVlSXptqsLo2uzPa5TVXpleoAySQirq87pHRV45tp qhk7ybka5bI+FSZDmoM9luXnUusiHRVXtNiZDaa9c/qAKKoY5AM+UxHMqIFu1WBaF3ig zlGXH2dtZixOq4IsBr+FIkJ5B5HrocEnaGb2kfDOHVzVsOpTk2r+hYWrWSVHTQjKYnaL NKVjBJIvOM2YONGm+6vA9JTRdgDJMkpZfz99oSUJPpdIZfkviYUyL3o3Gf68j4QpRdhM 9uiGucM9E+Cx+jzN5pEJV8pnMytFoMvCOEitO056sfXELl/KJ9xvVE2x5Wr+3BysQRLo WV9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679680307; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PuV3IriHAW7aZC8rFN25zhcR9dc8l3Vh+GPx6NtpMpU=; b=KMCBKb2FdH6GWwfVmMjSaE8ka56mrZl9g120gvIUuG41+Hbrm+sWXG5t729zdMeUpT JY7LULIEiaJk6FPYyR06jEUbBP44tE6hX4Xe0k0lYiI9weoLZiV6vdDWXzw8cn54Xyml BTHkZK1tuy0tFkHc1jCa5HJxEaHVm5rvZM/LbrIehvnZ89gMG3UWTvfDByyqSLeIUNs5 y23yDmQ5CExrGZoe2sLDKjWZ3Y8hUjjULrFbLk7Q7/D5nAImbLzbLzHigMbkiN6Q54Al cXfsBMk5BcLN+woXEZ+Ukr3ARzZ9qVD5l+kt0jFLn4lamIjWxQ66Meq3J+bv61JD0FDA 6Jgw== X-Gm-Message-State: AO0yUKXdUXuCk3SWbnuaJinhRmklzo1de92uMRTi5K4VfNmwVnKNqgwD 0jUrzPx62q0i9fl2W0f68Ue7PPcLuXMGqQ== X-Received: by 2002:ac8:5802:0:b0:3db:fba6:53f8 with SMTP id g2-20020ac85802000000b003dbfba653f8mr6667662qtg.25.1679680307357; Fri, 24 Mar 2023 10:51:47 -0700 (PDT) Received: from localhost (pool-173-73-95-180.washdc.fios.verizon.net. [173.73.95.180]) by smtp.gmail.com with UTF8SMTPSA id bk12-20020a05620a1a0c00b0074357a6529asm14512289qkb.105.2023.03.24.10.51.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Mar 2023 10:51:46 -0700 (PDT) From: Sean Anderson To: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org Cc: Simon Horman , linux-kernel@vger.kernel.org, Sean Anderson Subject: [PATCH net-next v4 08/10] net: sunhme: Clean up mac address init Date: Fri, 24 Mar 2023 13:51:34 -0400 Message-Id: <20230324175136.321588-9-seanga2@gmail.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230324175136.321588-1-seanga2@gmail.com> References: <20230324175136.321588-1-seanga2@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clean up some oddities suggested during review. Signed-off-by: Sean Anderson Reviewed-by: Simon Horman --- (no changes since v2) Changes in v2: - New drivers/net/ethernet/sun/sunhme.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index 4fe67623b924..b51b8930bef1 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -2348,9 +2348,7 @@ static int find_eth_addr_in_vpd(void __iomem *rom_base, int len, int index, unsi p += 6; if (index == 0) { - int i; - - for (i = 0; i < 6; i++) + for (int i = 0; i < 6; i++) dev_addr[i] = readb(p + i); return 1; } @@ -2362,9 +2360,10 @@ static int find_eth_addr_in_vpd(void __iomem *rom_base, int len, int index, unsi static void __maybe_unused get_hme_mac_nonsparc(struct pci_dev *pdev, unsigned char *dev_addr) { + void __iomem *p; size_t size; - void __iomem *p = pci_map_rom(pdev, &size); + p = pci_map_rom(pdev, &size); if (p) { int index = 0; int found; @@ -2386,7 +2385,7 @@ static void __maybe_unused get_hme_mac_nonsparc(struct pci_dev *pdev, dev_addr[2] = 0x20; get_random_bytes(&dev_addr[3], 3); } -#endif /* !(CONFIG_SPARC) */ +#endif static void happy_meal_addr_init(struct happy_meal *hp, struct device_node *dp, int qfe_slot) -- 2.37.1