Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2928325rwb; Mon, 15 Aug 2022 14:13:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ZxJEap7T+elIsGzXd4a91+6wvJwsCUEo6viRXscxg61+C3pAmS8ceu7y8T57QHmdMY3lL X-Received: by 2002:a17:903:200c:b0:16d:bc14:67e6 with SMTP id s12-20020a170903200c00b0016dbc1467e6mr18963432pla.128.1660598036610; Mon, 15 Aug 2022 14:13:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660598036; cv=none; d=google.com; s=arc-20160816; b=inK2WmgUza8Ot/hCQ7HzeKMyCkDKxLit8RJeSi9vkwFfFwKWGtAJDB3kX4AlCgoJa1 CLF/bgogOgWBWabjwmQeflOV3TWtUHGPoN+WnHyEnsZS7J39V8wLl9lK1d/207sfEroB El3gEmHEGQs+1JyI8BY4P5QFNz7vMT4zNkk7AsmTueOgxSwTkhsshADSgg3fC6D6Pif1 lSrovslzSml6edFya6J6jjiSqhq0XG4WGr91XS6G1ArhFBuHikaj1iokdowwhex2w6aD OLVVgU47jeQC3tligAS4LmmEaYuhwHTwfSDONXCOvW+PoXcKkZtzVt+udDVRPBZPyJHS GxUg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EONfjG/7OylzNolIv0HpA29FoDejOIQ6JnNPDkIVuBQ=; b=IT+h7o2DuqzFL+tXh3SmL8j3vYWAIzwAJZXoF+AQjm5xxcMME+cs4SAS/fnForfwnh tXVCSRWsXIsUgoL3gFYnIkiAzVYTDvsDSqmSBt1mm7DJuxzGziwVKHhQYMmTzIfcnJHT zwA8C1MNyFs3wGVjdbbGcTNC20tfFMjghpsIAAZhZogRxjo17UiN101wVblgb56A+j8d aTemnoSe24oLAliW3XFFMln+FSfuF7E6CkGTPkyqnq1ryXZF9J97oYsXy+TXu/Sw6DXm fNugXn1LMYWPdOha1DHLAFTYXK4bHF+EO1TOcjymbWTgt7Wa4wpaWHHAoUQT1Lg/NuL2 dBMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Iiy+/usM"; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a170902b68a00b0017267efe10bsi5391804pls.286.2022.08.15.14.13.45; Mon, 15 Aug 2022 14:13:56 -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=@linuxfoundation.org header.s=korg header.b="Iiy+/usM"; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233180AbiHOU5a (ORCPT + 99 others); Mon, 15 Aug 2022 16:57:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346951AbiHOU4H (ORCPT ); Mon, 15 Aug 2022 16:56:07 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B579A2DA94; Mon, 15 Aug 2022 12:11:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 78FE2B810A3; Mon, 15 Aug 2022 19:11:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6595C433C1; Mon, 15 Aug 2022 19:11:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590698; bh=7ZxS7jGKRr+fV61GISzQduPft6Zbuh8vkk9x+jopIpU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Iiy+/usMntatwr9Ke/HL5uVe+wo4heayKeEBlRqgI3moHY2ed1HXZMOy8oKhxzT3Y dgqg+noK96oHvAUpAgoVcZAl9JDxQPfshU4/8neRxM+paN386yBraDnqNNsAVrtITO r1LubfjpdV3syMyEUelXAN4nbe+TWh8bxKE+ohF4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Oleksij Rempel , "David S. Miller" , Sasha Levin Subject: [PATCH 5.18 0343/1095] net: ag71xx: fix discards const qualifier warning Date: Mon, 15 Aug 2022 19:55:42 +0200 Message-Id: <20220815180443.994844594@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Oleksij Rempel [ Upstream commit 225b0ed27e6ac523e5e98e7395392446859c7f20 ] Current kernel will compile this driver with warnings. This patch will fix it. drivers/net/ethernet/atheros/ag71xx.c: In function 'ag71xx_fast_reset': drivers/net/ethernet/atheros/ag71xx.c:996:31: warning: passing argument 2 of 'ag71xx_hw_set _macaddr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 996 | ag71xx_hw_set_macaddr(ag, dev->dev_addr); | ~~~^~~~~~~~~~ drivers/net/ethernet/atheros/ag71xx.c:951:69: note: expected 'unsigned char *' but argument is of type 'const unsigned char *' 951 | static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac) | ~~~~~~~~~~~~~~~^~~ drivers/net/ethernet/atheros/ag71xx.c: In function 'ag71xx_open': drivers/net/ethernet/atheros/ag71xx.c:1441:32: warning: passing argument 2 of 'ag71xx_hw_se t_macaddr' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 1441 | ag71xx_hw_set_macaddr(ag, ndev->dev_addr); | ~~~~^~~~~~~~~~ drivers/net/ethernet/atheros/ag71xx.c:951:69: note: expected 'unsigned char *' but argument is of type 'const unsigned char *' 951 | static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac) | ~~~~~~~~~~~~~~~^~~ Fixes: adeef3e32146 ("net: constify netdev->dev_addr") Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/atheros/ag71xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index ec167af0e3b2..5041265f4226 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -946,7 +946,7 @@ static unsigned int ag71xx_max_frame_len(unsigned int mtu) return ETH_HLEN + VLAN_HLEN + mtu + ETH_FCS_LEN; } -static void ag71xx_hw_set_macaddr(struct ag71xx *ag, unsigned char *mac) +static void ag71xx_hw_set_macaddr(struct ag71xx *ag, const unsigned char *mac) { u32 t; -- 2.35.1