Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp573559lqo; Fri, 10 May 2024 08:19:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUqUySHAvrpUQXfQtfXpR5NznBrDWzibWNGl8IP5K9u30kAGA1jakezEeUKR3YeK8rp+0hLxn+IY8zopzC4a0reS0osRtc/ZpbCbLSCTA== X-Google-Smtp-Source: AGHT+IHbqGISseituLY4gxKVZUbSQJRU8yWam5njdh8SCUEOY7f7Ha4JU3g/Cb32S+5DPbTXvF1N X-Received: by 2002:a05:6a21:78a4:b0:1af:41d1:732e with SMTP id adf61e73a8af0-1afde1c4cf7mr3461213637.46.1715354398202; Fri, 10 May 2024 08:19:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715354398; cv=pass; d=google.com; s=arc-20160816; b=y/BWSEHNmJ+5DAB1MZg3+k4KvqVx+OjczShy4nhWT6eTFaggWqKls1j4DkTuNx7ckz FbM4BEDZRIhowuLyN4kFdc2WZd9GWMNhX+ISdKOdzDm/+hc013+UIRnqgdktGsLd4sq7 +gpYWKHMauYz97MPFN+GBoq3DbE9vZqPLxStGj0+7/tPLUQ6SUAu/HxA4oGElyik6SKv l0jl+F/i6rN3mhrb+hGB4CKLKF4jtkL86Kry6klJCT3wvwUmO6IHr9tMF+Dhjgj88cw3 04MsbQgs1qvPC5PME7KjH+mFwDNhZxlEZjeB7GTWr1ieveX+g7G4YH0hx0xsyvMYNJs8 QhYA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ka1+pk2geib/J7YLFiKu4r03GZT40+nA2E2uYjpMTOk=; fh=WGDeGHObwlz5o4zAT7Ua74kcJUvcoAlZj+3vxcpUXv0=; b=eyAghNfmYq6I2y3AVOFdmIbYwpEQ5ZOl3V7K0ZzLTIgjjENxgbguz3xWwRK4KKQuFx xed5sJTbNFNfgempkKiple3fEjBMwDyxW5/MfPoAuyCOrF5juHOE6jcwQPOZ9zwplcDr fZIzWsyRDSIUwtxbd5l0QU+HnLaDHzGsLt6S695mZKCkYEG5GAFf88LuG3aWcL+ia3Gr Ys5Js5rbjqoN4PSKErYlbqph9Bk+U2gAxgbe+YIih/ztJuDMXyrHJC/jzs63NfXjBRIz dIjHJ1+l+ZHY958HaRE3xXdSa/JtH2lqU5Y3mGBHhUwyOUidtHdNj1+dNbaBvk99m8jU 7zrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b=MozL53ih; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-175686-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175686-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a8bcdcsi3863784b3a.85.2024.05.10.08.19.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 08:19:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175686-linux.lists.archive=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=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b=MozL53ih; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-175686-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175686-linux.lists.archive=gmail.com@vger.kernel.org" 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 5F6AB288228 for ; Fri, 10 May 2024 11:36:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 154F1176FB6; Fri, 10 May 2024 11:31:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b="MozL53ih" Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C23A1649A7 for ; Fri, 10 May 2024 11:31:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715340684; cv=none; b=nkId6fUKLVw5aHzG5J2qenH2YwrqSppzzbMxSZSKX1UeI0+qvdw4ZmiVaQ2tlOMGYJEq8GCPeIUlCZAB2IFKH3zCUgjaq6ogLQ6YRRn5NLvn65zZROZK1nRBQ1hVoO4LVA3OzsMhnD+tyfkZvBaOoacKHTCZcFf4M8SRrB2KpeY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715340684; c=relaxed/simple; bh=j9nzsjB8ZKN5OEzUlhmbXTCrNTlkvkyve4S9+JzLx3U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TlGINHTyb98dsWaiw3AJvYym0oe4Uyh+jBEmc2jAtMnu+/kn6BhX85/6MeEbDfm6dh+KwPiiWF1ns4CyNJJN8dVe94cC0ciNECfQJ5/BtuVolYeodlgRxw20zS3r/Yzx/nbe/LdVNarUfnw+Q/StHFXi+MSQ7GokVn3thrDzylk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com; spf=none smtp.mailfrom=toblux.com; dkim=pass (2048-bit key) header.d=toblux-com.20230601.gappssmtp.com header.i=@toblux-com.20230601.gappssmtp.com header.b=MozL53ih; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=toblux.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=toblux.com Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a59c5c9c6aeso469144966b.2 for ; Fri, 10 May 2024 04:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toblux-com.20230601.gappssmtp.com; s=20230601; t=1715340679; x=1715945479; darn=vger.kernel.org; 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=ka1+pk2geib/J7YLFiKu4r03GZT40+nA2E2uYjpMTOk=; b=MozL53ih/i1Bvx7NVVn0ZxZdsKg7rnyF7Hyo0irZxY4QHXc6cQR0c+6aE+K0ebWNJo 9zxwSPbZ6oCFIIETIfsJP09awBHZrfXzlGTmU4urUJzeZdEx3SenltpwSiuNojDU5Vyk iLFuGJAsRD8P/oqMdosTJKHq/0bxirLYZoawVqld6T+923Rxpzod0xZJx35Ed1xo/rx4 SFFqzLRbyx7ykLqNuROPOG40k9WznVHW5TyOJR8roLBToYXhHuDNArYJUxauxBCFeMnB avuCUMug+yy2kGC8ZU3vYwL9N3aMKOIbbcyFno5PqW8Y9uFcAyiELCgTqTUSD2+/ZLhM zYwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715340679; x=1715945479; 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=ka1+pk2geib/J7YLFiKu4r03GZT40+nA2E2uYjpMTOk=; b=WFQl5gi50f5qYlEkkepHL9RPNLqxlvoODWoFqScCZLLRHRDAZ7E17ZFe5EBRxeh/1Z 7oPCOvL9J/PmMJVYK3t8RNxTlIQsigqdWLgkWT9/jeALCStKQRfG5l4RFRtSilXpP7G0 rAniEtCDuMfGiPMJIh7xTMOPn4GYTDILNrtsCbh6OlSwXQqNjw98NU9FxfWQEx0g7YxC JQah/OlqwFdpmHyRh5ibWkzzRSNQNSdhr/99QB5oewYl+I2v4KCLCT1l77FfcUt6lp9b DB3lpeH+3SgTLet8HH0eTDGzFaYD3wfa14vP2pzlRrc5FWzi9XFb1MiymSr44/188z5W VTXA== X-Forwarded-Encrypted: i=1; AJvYcCUHk2MFCtkYXGqEDWdeKk9HfQoHwb5buby1bF3IgBf579G1RSoSdjmr015aRlbw94m2hI1WYsHWTMm1IavsKNptBPhN6ri21kWCVl7f X-Gm-Message-State: AOJu0YwT5h0rLH+1QWs8PbXPbJDjIcFi8HObQiFowHziEEaevVRNnJ2c 6VIuep2R9JmKhKP7kdFAyR46oUfGTDeKsxZgcAsKxL9eSzJSVVxRBVfnwppD41Q= X-Received: by 2002:a17:906:7084:b0:a58:96fc:bb53 with SMTP id a640c23a62f3a-a5a2d5c7f02mr169164866b.20.1715340679364; Fri, 10 May 2024 04:31:19 -0700 (PDT) Received: from fedora.fritz.box (aftr-62-216-208-100.dynamic.mnet-online.de. [62.216.208.100]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1781d5afsm176254166b.3.2024.05.10.04.31.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 04:31:18 -0700 (PDT) From: Thorsten Blum To: thorsten.blum@toblux.com Cc: andrew@lunn.ch, arnd@arndb.de, davem@davemloft.net, edumazet@google.com, gerg@linux-m68k.org, glaubitz@physik.fu-berlin.de, kuba@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, nico@fluxnic.net, pabeni@redhat.com Subject: [PATCH v3] net: smc91x: Fix m68k kernel compilation for ColdFire CPU Date: Fri, 10 May 2024 13:30:55 +0200 Message-ID: <20240510113054.186648-2-thorsten.blum@toblux.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240509213743.175221-3-thorsten.blum@toblux.com> References: <20240509213743.175221-3-thorsten.blum@toblux.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compiling the m68k kernel with support for the ColdFire CPU family fails with the following error: In file included from drivers/net/ethernet/smsc/smc91x.c:80: drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_reset’: drivers/net/ethernet/smsc/smc91x.h:160:40: error: implicit declaration of function ‘_swapw’; did you mean ‘swap’? [-Werror=implicit-function-declaration] 160 | #define SMC_outw(lp, v, a, r) writew(_swapw(v), (a) + (r)) | ^~~~~~ drivers/net/ethernet/smsc/smc91x.h:904:25: note: in expansion of macro ‘SMC_outw’ 904 | SMC_outw(lp, x, ioaddr, BANK_SELECT); \ | ^~~~~~~~ drivers/net/ethernet/smsc/smc91x.c:250:9: note: in expansion of macro ‘SMC_SELECT_BANK’ 250 | SMC_SELECT_BANK(lp, 2); | ^~~~~~~~~~~~~~~ cc1: some warnings being treated as errors The function _swapw() was removed in commit d97cf70af097 ("m68k: use asm-generic/io.h for non-MMU io access functions"), but is still used in drivers/net/ethernet/smsc/smc91x.h. Use ioread16be() and iowrite16be() to resolve the error. Fixes: d97cf70af097 ("m68k: use asm-generic/io.h for non-MMU io access functions") Signed-off-by: Thorsten Blum --- Changes in v2: - Use ioread16be() and iowrite16be() directly instead of re-adding _swapw() as suggested by Arnd Bergmann and Andrew Lunn Changes in v3: - Add Fixes: tag --- drivers/net/ethernet/smsc/smc91x.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h index 46eee747c699..45ef5ac0788a 100644 --- a/drivers/net/ethernet/smsc/smc91x.h +++ b/drivers/net/ethernet/smsc/smc91x.h @@ -156,8 +156,8 @@ static inline void mcf_outsw(void *a, unsigned char *p, int l) writew(*wp++, a); } -#define SMC_inw(a, r) _swapw(readw((a) + (r))) -#define SMC_outw(lp, v, a, r) writew(_swapw(v), (a) + (r)) +#define SMC_inw(a, r) ioread16be((a) + (r)) +#define SMC_outw(lp, v, a, r) iowrite16be(v, (a) + (r)) #define SMC_insw(a, r, p, l) mcf_insw(a + r, p, l) #define SMC_outsw(a, r, p, l) mcf_outsw(a + r, p, l) -- 2.45.0