Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp619804pxx; Mon, 26 Oct 2020 17:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyXeKeRcjui7Q8l/N0jtYgOXYQpOdg9H+TVXkIdnTagN120jv52LGSodJ80d8mHCGBFFve X-Received: by 2002:a17:906:580e:: with SMTP id m14mr17669988ejq.237.1603757263314; Mon, 26 Oct 2020 17:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603757263; cv=none; d=google.com; s=arc-20160816; b=MAgtO6PzmIJptB9buBSdQdSM1624P8rBfJMVepaxxkR+QEXx1eomEmfQfCyFQHhvq6 +gQjoDQtNxv2K5p6bLZZB3UEAFMiiWVlO4h7Z6dieKiqQqHXjkoLctisvtVXNjm2lcRj 7gp3i8jX8EcUJgAI2vxhDwpJ+F1SGyD6wzOYyNClm8SRHUH40fktmrFMuxZptiguoVre l3Tk65prVaDC2YFe4x3UTf45RNRIEtZGTIEuaYgrUCxyMU1EeNBfrCGp8pu/MZzZxxPF ASW1286Ck7ME/5C0lapLaquJWCGD/AcwRTnGH3nUZmbyRCPN9Dkh85XwoSCfamrIivWu tUwA== 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=w+6059o/fg9x9pknG9hL9QAGRWR9VZ3TMs3dKyDSmTY=; b=BxLngQvD6va0c165Vp1xnhGZr1XCkuUNRHyfWv8WfbUYu/LofklBDK4SB4LTSMHCvs Gb7fr2lbllssX+QWotlrJBsrFMZbrHK8DnCL9IEDYvQYZKQYhmXwqC9Mr0BMzC3KwLiF 2/0wmuutKToQBZJ7oQexyGln3cdJ8gKarnKzve2kDVm+e0GC55zF3X6KBkuDSxjy/D+G UdXV9rmRvGbD9WDlPezrTJtAW3JCWb4Ue1dYAL9Jy+MGFBZppL7NnXNM4JJ/x4tH8yYy 3+DM72gAj+59+bzRnUbMeqslLzfU6iNy4hGOTdSqNrU1c+EADigWZHzO/Io+o3qHR0bv fZcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GxqbmCRI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx24si8282612ejb.449.2020.10.26.17.07.21; Mon, 26 Oct 2020 17:07:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GxqbmCRI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389516AbgJZVe0 (ORCPT + 99 others); Mon, 26 Oct 2020 17:34:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:45104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389407AbgJZVeZ (ORCPT ); Mon, 26 Oct 2020 17:34:25 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ABA92207C4; Mon, 26 Oct 2020 21:34:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603748065; bh=nxOKKlKqMU4NDYkRtekhmwGMQw4/QJdTu+0OdBe0WDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GxqbmCRIF+lLlTKSGb59T+3H/HmmR5SxAgB4Zivqnprwxke/yqr6jU5OpwPiPTpyE AVjYwd32xXkfHh3tLYnKMcvGEDQ8yVnoxKNQL041KXg1Zk51BpD0cJaUQ1RDr143Vu t3BIaPRSPSg/BvFGHAYwnJ5MABs99c9msl/xBrag= From: Arnd Bergmann To: "David S. Miller" , Jakub Kicinski , Yuval Shaia , Leon Romanovsky Cc: Arnd Bergmann , Xin Long , Alexander Aring , Ying Xue , Sven Eckelmann , Fernando Gont , Cong Wang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next 11/11] ipv6: fix type mismatch warning Date: Mon, 26 Oct 2020 22:29:58 +0100 Message-Id: <20201026213040.3889546-11-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201026213040.3889546-1-arnd@kernel.org> References: <20201026213040.3889546-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Building with 'make W=2' shows a warning for every time this header gets included because of a pointer type mismatch: net/addrconf.h:163:32: warning: passing 'unsigned char *' to parameter of type 'const char *' converts between pointers to integer types with different sign [-Wpointer-sign] addrconf_addr_eui48_base(eui, dev->dev_addr); Change the type to unsigned according to the input argument. Fixes: 4d6f28591fe4 ("{net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function") Signed-off-by: Arnd Bergmann --- include/net/addrconf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 18f783dcd55f..074ce761e482 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h @@ -127,7 +127,8 @@ int addrconf_prefix_rcv_add_addr(struct net *net, struct net_device *dev, u32 addr_flags, bool sllao, bool tokenized, __u32 valid_lft, u32 prefered_lft); -static inline void addrconf_addr_eui48_base(u8 *eui, const char *const addr) +static inline void addrconf_addr_eui48_base(u8 *eui, + const unsigned char *const addr) { memcpy(eui, addr, 3); eui[3] = 0xFF; @@ -135,7 +136,7 @@ static inline void addrconf_addr_eui48_base(u8 *eui, const char *const addr) memcpy(eui + 5, addr + 3, 3); } -static inline void addrconf_addr_eui48(u8 *eui, const char *const addr) +static inline void addrconf_addr_eui48(u8 *eui, const unsigned char *const addr) { addrconf_addr_eui48_base(eui, addr); eui[0] ^= 2; -- 2.27.0