Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp1212148lqo; Thu, 9 May 2024 07:45:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUpbuxtDTGyMcu0BPOhFXVsITiF+Dswz7kP/ADQ+0hARynh+7gDNw/GbOiUAAdLpYm6OmubELb7fMO6ABFOPGV4wb5d9UyLeayDLIRYmg== X-Google-Smtp-Source: AGHT+IEla4RRx2JLM6D5Yj+/gXc7Fv4KWN3Cw+S3Rm9uw9G3UYc5pOOtfEd4/XMfiFnJXVUukp07 X-Received: by 2002:a05:6a20:5607:b0:1af:b4f4:e73 with SMTP id adf61e73a8af0-1afd14746d4mr4139762637.21.1715265920165; Thu, 09 May 2024 07:45:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715265920; cv=pass; d=google.com; s=arc-20160816; b=vCnmAyzhEjom/GLz98FbTeWQ87cG9MUv9AoKeVrah44CodHfy1ICB8dDnV4CMHLaiT mk71eMBEX/XWRDeUCq6zCE0C30cVFcsEZBeNDKCgSTEjXj0V2t/7lATGQNNPIT4vZkoY CmetSSjlq73pxEdnuaNBEmsFmhrIkViChTILwSkm4Os5HhsyQ9L2J43inccomH5Hw6xi 6aCRdVUSstsLUs+yxr9YJyXB2oRacxba3XAcFhaRHonIK4FFqWMbWTCeo7STjWBxyldk Ac5/ayyVhfp3oRF+RBik+bCAzwx5ynWkFcDsMbwBcrPW/dHJ18D9JqSbZgjhFuwXweyL rnPQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=OFeEjeHJx+pU6UTBEcenyMWxNjqm06RNmgZPQXXxQ28=; fh=Q5ZpOkKcMAX6K6Izx5c1ZN8uV39JhWqfpXrb8fojKVs=; b=cAInOnedoScK2Zdv5rk/sFHmQ+pl8adMmINwJc8+/rMQsvRjByD0owgtSL20DYNGHB sI16ccBlWUdFZUS6JUpPFntMyANVPuiFfEhF9yDkm2Rjwo9RT3A1nRylihjWOYt8+UV5 6T9xhl5n5djEdbMJDKOGDDpK0KMqcqGPLlOwQGlbX98qrfBUEN75ElifFqbQv9oNuro2 0Uf9Ty7BOCY0P6SbFtOHqA7FroLdl6dDG/evMq5gomtsAtCX+c8RNX6ger5PIimuC2fn 82x1QUai5pV1N37WBa9onqKkYktaQej6nJSsVBSk53hWrPHtf9/66aJoJnBzYTiH9G+f bPRA==; 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=xrFJ1d1f; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-174488-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174488-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-63412f13ea6si1486509a12.778.2024.05.09.07.45.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 07:45:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174488-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b=xrFJ1d1f; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-174488-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174488-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 2BD2D282EDD for ; Thu, 9 May 2024 12:19:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6BC9914BF99; Thu, 9 May 2024 12:19:00 +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="xrFJ1d1f" Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 7A86114B088 for ; Thu, 9 May 2024 12:18:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715257139; cv=none; b=ZxPnXvUZClWCnMK4DYdSeMKsourj/RqZntrP2qrGbdTSxzgSwDAHu4Vr3Ll6imaqfwwxkDKeCT/7g0QrwpXziTukiRwkxAnjfjYUxs01hAnZoUtWi0GLzY0QdOh6+QdPtfSHyFFR4KeKkmjR43OizdTn1bzvWsdMmAEqTbkA1MA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715257139; c=relaxed/simple; bh=I4J2AgOYxhBQgAFZ1wo+lSl1T+rt+Z0V1hfBJkl2e/U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=ML0vwZyJ9zSQffzcPCZJnkp8woQTtJdRBLZ6iJoAT6rwe4JOAWE8oTxpMwCGxBMqmGv7xsbDBzc8yyVEqQrVcDIyyQUL3t/gNTYcJ0wYXldXfj51R8CFRKn0W6dA5wMBh36EXS2XrIABU18SJt77PgANR44x9Ywp85LUbAmFy9M= 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=xrFJ1d1f; arc=none smtp.client-ip=209.85.218.41 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-f41.google.com with SMTP id a640c23a62f3a-a59ae3efbb3so83312666b.1 for ; Thu, 09 May 2024 05:18:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toblux-com.20230601.gappssmtp.com; s=20230601; t=1715257135; x=1715861935; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OFeEjeHJx+pU6UTBEcenyMWxNjqm06RNmgZPQXXxQ28=; b=xrFJ1d1fRsr0H7R74v1YGLsQaCAau3dLszSD25E5yIHWd4uYcpiYU66XYNiMuPFwLC O7wG0P9x0Vx9PCE0OhCA9NZtprHc3FmCYHCc3fPc/Pxo+3Sv5/bOFlSbtXe3bGayM5Kp bcuEMsK7iaRgaskq6jEDLOrR63D81QC3HMxlLRcMKqOU/uWEfmDA86UV0Vwx9luEoIlk sYUqNH/2qWG+UGV5ozR0AAB4mPlEzoY3a9cL8A0pfQelbjq0D87h9e9vHN+csySeiWUG lb1qCNux6g9urg5LJxzRESwXJfU19e3LSUflOVhI4Tx8Im8Dp3WlaXDkiOAU58eYApr9 gtHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715257135; x=1715861935; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OFeEjeHJx+pU6UTBEcenyMWxNjqm06RNmgZPQXXxQ28=; b=VJ7wgZBHGx50M6Kc/8x/cfNHMUCohI+icIsKSoXWBi1QxjU80h5m6jULeMmL5gCi/3 KtJyRtDGQHXVMd6X5TwUea+pvc+jyaaMSE3aV3SA6urocYbxmDXHqfjc10QoHZA9y9+9 kt0UCtXnVknFSzmyrozRdGXXPBO3v8b+3mQywBxrKHkvL5SYmGV+BPjo/YuviG5g6lYk pv7e9IWe6bNoB+v9rzMsDPo9lPLd76oveM4kBXJhLagS1y5ti4QpNWlOlel9EHD9ZUq6 F6mwAu2XUDBfnF1CA8D4H+jlubU88hfNdMDnTTajZXLAsxqw+XqOjcbqZiMRtBkYNhi9 m6rQ== X-Forwarded-Encrypted: i=1; AJvYcCXlKbQeCxBiWDSrj/28/56SLBqkwAMs5zvbeHQL/bIuLvl/GLtCSkp2ze1VYd6UMU4JIZTpfA72GGn3imAGuimLtvCfYxWQuN8bfpdY X-Gm-Message-State: AOJu0YxvEKqUdU5+eQVh05MOcLB11oaYEKHbSf5Mq83qvJGEtRUHoLKH A5PBXB5VSdLWGZNkxDPxLEA6Vz67O6vMumgBqWfDJvuIV/D2CTvF0IxAJJkn9nA= X-Received: by 2002:a50:9e85:0:b0:572:a089:75cc with SMTP id 4fb4d7f45d1cf-5731d9a2825mr4182852a12.5.1715257134718; Thu, 09 May 2024 05:18:54 -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 4fb4d7f45d1cf-5733c322be7sm657075a12.80.2024.05.09.05.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 05:18:54 -0700 (PDT) From: Thorsten Blum To: Nicolas Pitre , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Paul Adrian Glaubitz , Arnd Bergmann Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Thorsten Blum Subject: [PATCH] net: smc91x: Fix m68k kernel compilation for ColdFire CPU Date: Thu, 9 May 2024 14:17:14 +0200 Message-ID: <20240509121713.190076-2-thorsten.blum@toblux.com> X-Mailer: git-send-email 2.45.0 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. Re-adding the previously deleted _swapw() function resolves the error. Signed-off-by: Thorsten Blum --- drivers/net/ethernet/smsc/smc91x.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h index 46eee747c699..e5d7f49915c6 100644 --- a/drivers/net/ethernet/smsc/smc91x.h +++ b/drivers/net/ethernet/smsc/smc91x.h @@ -156,6 +156,11 @@ static inline void mcf_outsw(void *a, unsigned char *p, int l) writew(*wp++, a); } +static inline unsigned short _swapw(volatile unsigned short v) +{ + return ((v << 8) | (v >> 8)); +} + #define SMC_inw(a, r) _swapw(readw((a) + (r))) #define SMC_outw(lp, v, a, r) writew(_swapw(v), (a) + (r)) #define SMC_insw(a, r, p, l) mcf_insw(a + r, p, l) -- 2.45.0