Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp91488lqo; Thu, 9 May 2024 13:38:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJbrP0/FV3Nl8XFewf5WNU+MB5CbMnsB9Q8JsH76jZwQa2TFVmhel4ym+eMY04fn6rdD1w8cTYOdpEiuOvZxC0fTzCN8NI9wbcfYjXlg== X-Google-Smtp-Source: AGHT+IEMm1bVsT/6te516EgQpCgCArpF/VAgNTgr18T2z0ezJcDmF2JdU+wmJYLKWyU9ceFm5U2j X-Received: by 2002:a17:90a:890a:b0:2b4:3669:616a with SMTP id 98e67ed59e1d1-2b6cb7d59demr717270a91.0.1715287135591; Thu, 09 May 2024 13:38:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715287135; cv=pass; d=google.com; s=arc-20160816; b=j7fAuNCF375dr+5QNKUPBa6H78gYMVSBubTxQY7i8jDbta74SR36hSrkzpaQH//73I l0K4OU4v1gRDM08DfOhqCthlHdbdp60kYs8od7kYfLZJZQfkyOaIDjhX8VNmBM9VNjQn 5twvtODeC3XT8EMxEVT1zfRQEYhnhFNuZyLdQbwKZC6gNnd8Hxui9tRBVuJK+7+y7/82 8ftZUCBSZnLbWMNE0x54QVNj/rxh9Y55ko255MKfpe2BClfyx+QiKxuCT5N1cAaWpd1+ 4R75xhWHPUI+ffwRkdOEfUAScznW68O1uY28voc4ny6P1bRzoY4i2aZq9/pV+f/qJDn9 GSCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ts0hQ/+xW7g60neUMYTCGyqDcd3REU5NHScQ5L3JXqY=; fh=O5Q4ldTLhK/WtuMuwXe0Avfs/PrFhQH65A54O2VtDgE=; b=IDaKAQq9M6wHzUdcp+RMT52lOoyu7xEb7wgzbXOy9tiNE3HoU425tEDEzO6dyHH32v VM3z4RrxAosfeTMmxqcYyz+LzGJ0isByd6JD+D0uE+ogv+OhrZw7KLR7J0ZNqFKwB4/h q4irxz5yQ1Tl4mp6aBU6q+VL53TQrNFTRSNaMwAtPas4sYGZSIl3HbX0aAjhalL8mNmB W4R+V8Xx44hC1+OVcLY47Vfhz4HY0xtGMMBE+7fx8Ok7R4u5WaVLlCI6dP2M17JvC5m+ hZbcmdCMp33oM+/Rn4rp4ukj9uYGMt/Dmn5bm1aAE1L5ugHxQIz4qJ5ILKWb59Ueejd2 Tzhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vBndXtjF; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-174935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628ea756csi4180380a91.105.2024.05.09.13.38.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 13:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174935-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=@lunn.ch header.s=20171124 header.b=vBndXtjF; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-174935-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174935-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 85B7B2815A2 for ; Thu, 9 May 2024 20:37:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BCC257FBD2; Thu, 9 May 2024 20:37:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="vBndXtjF" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6AE0D4C618; Thu, 9 May 2024 20:37:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715287032; cv=none; b=BlNAaMDx0ORVOr+50Bxa3YKMkqYvPlHUb62yKDbDf8gJUbsKUqbHCS1jhRfvydme8dujdJ51hMgiwvxfz8rX/O/ZsoyWOiKbaEwpQJ3Id15b7t25xfYv4ZL7j7AKv9FR+Lm57Grzrx6YvLG4voIzcaKLL9Dej2Ux8/prHlAPtiM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715287032; c=relaxed/simple; bh=x7LhucK821k3vSDngfFbnMiXnOtN4rPhBuqtaKRTceA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tbPH7pOY0F6ynYZFbEfzCBWlbM0JuhY9M3e6iLi99FGDeM1/FQodEY5f0eKWbgU8Tj/PFzrZk0dzVRApnrY4Z4AK6YbJN+0q3CZcOL38XDw4pat2wrJrGVRbC7upNh7gOTyZXiqszggZdm7m0LRp66w+n9A9lFuCCUNM8D6lUWM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=vBndXtjF; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From: Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition: In-Reply-To:References; bh=Ts0hQ/+xW7g60neUMYTCGyqDcd3REU5NHScQ5L3JXqY=; b=vB ndXtjFxiQyjGyXFPOPqJvLSuYj1dZgBZBtGlR0d534n0nhdN/FqezzvTA6FSRMOSooXTH6Mw2mv+F krBi5WwH8hWLFR/pPsDeq6MRSc/Z3lUJhDrf8OTVPellNItjSPBqaRgngM4K6lIldyp2KxQdeufcG ImLBwCUicnKLxqU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1s5AVd-00F4zH-4P; Thu, 09 May 2024 22:36:57 +0200 Date: Thu, 9 May 2024 22:36:57 +0200 From: Andrew Lunn To: Thorsten Blum Cc: Nicolas Pitre , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Paul Adrian Glaubitz , Arnd Bergmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: smc91x: Fix m68k kernel compilation for ColdFire CPU Message-ID: <98259c2f-b44a-467e-8854-48641984e468@lunn.ch> References: <20240509121713.190076-2-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-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240509121713.190076-2-thorsten.blum@toblux.com> On Thu, May 09, 2024 at 02:17:14PM +0200, Thorsten Blum wrote: > 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. This seems like the wrong fix. commit d97cf70af09721ef416c61faa44543e3b84c9a55 Author: Greg Ungerer Date: Fri Mar 23 23:39:10 2018 +1000 m68k: use asm-generic/io.h for non-MMU io access functions There is nothing really special about the non-MMU m68k IO access functions. So we can easily switch to using the asm-generic/io.h functions. So it rather than put something back which there is an aim to remove, please find the generic replacement. This _swapw() swaps a 16 bit word. The generic for that is swab16(). I'm also surprised it took 6 years to find this. Has something else changed recently? Andrew --- pw-bot: cr