Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp356454lqo; Thu, 16 May 2024 08:13:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWoxBWhykldLeUd98OaGexbTjDr1EhtIWcSTJl5U0TMQ1p+pVoPm9QXk3DB4skadL8485Pafd0TFa8/dh3pNu+6lhLmHpJSyn/QtuQxJg== X-Google-Smtp-Source: AGHT+IE6zTpa15hzMWWN+Mr5A8/5Ved4jXMGyYT+jvkg9fl2LWauNyhyKAJGYvZkFIrS4j1kuc/L X-Received: by 2002:a50:c055:0:b0:572:7926:a0f9 with SMTP id 4fb4d7f45d1cf-5734d6e056cmr11618010a12.41.1715872408481; Thu, 16 May 2024 08:13:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715872408; cv=pass; d=google.com; s=arc-20160816; b=hAiWC+TKD9TegCp4/iEHMwNnN3yxGyBdLwmMHJAUN9/CRXQxC9wtZrePPu1OcDWzeT e3TQdEnlvkb1BhJWPWktpFX7ZQUsT8jJ1eJ7+9tlq0fk8u1G4gyTdu10r9ifMK+WleKU 2zlWq0bdbVFk9tkPt1miej9VNspxfW7QOxwoCdzyPjq8tb1EFzIzs95DYJSWjFHWP8bt 813f9ad+A3BWyHqvUJvWbDyriiN+rCVR6OtsWHGrC+/XbPddCpVJPMZC0c4jv5hVvyIL U9gBcnGq0/4GC6H31C8aHH9F4zaIrMN6jjEEoiUIc4D+Py0ZIzYIF1OLOm8AHwPHSGUT PZOg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=Pe5Vtdlgyg4X8O20OCekmLHTuiLDo63Hjvcy1VkxkQ8=; fh=Bq6pAdGVIMrPdGpqPe23CV+e0gpsOE/5A1yWVFpABvU=; b=wwAidaxZvywILFT/kVkg5+Oka/sgZpPPfUDSVvYz4HPUMBxLMDUEXeGqFcTbS7NCob 3VUhD5bhS6Nk3aTTlfV7L0zGRnq4K/6vrZjMA246Pz79GUFNEQOJULpiuWR3Wt/Ok2yT A7y7dUjd/X533vXJ+FwVT3KZ0e7X18w3NMp7Ul9oljzWvlT9xw1IOGKrDAg1TjWXg/3E w0DN2rXsiggAj2Wk82tEj6QlOXkBqllz3JxSpEkVr+R/i7eXmN9rTTwaaIvB1Ujb4Ddh lhuClpyUZt2UcMK8s0fXPdWSBT7f20PFJcExSDSiunH8N9tMceo/pdIH9QpjwbwoRdwb LYUQ==; 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=A6fUyDEb; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-181215-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181215-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c3738edsi9147646a12.599.2024.05.16.08.13.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 08:13:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181215-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@toblux-com.20230601.gappssmtp.com header.s=20230601 header.b=A6fUyDEb; arc=pass (i=1 dkim=pass dkdomain=toblux-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-181215-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181215-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 1189B1F227B5 for ; Thu, 16 May 2024 15:13:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10BEB14D44D; Thu, 16 May 2024 15:13:17 +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="A6fUyDEb" Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 AB8F11E491 for ; Thu, 16 May 2024 15:13:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715872396; cv=none; b=sQGhYErOEi0aSFK2gcpPf7vC7kx37tEmWjtiH4O1PuFaZyIJz0z82SdpN/WFBMLpPI7LO+3lKFeBFtjR/0p96f2iv+JbonpKuSONKani2VBSz4aGTkpN4aoUH+ZhsJBuAtRAwsXJRFa7gJOQEg6ICUixX4Uz6IG5wgQ6D/ctlAc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715872396; c=relaxed/simple; bh=apMWFyWzDxCIes+oxvQb5FaNJe2ZBqfCD2Bawd4Apms=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To; b=ftICmDdDj4iD6aua93/A0fhcnUdyH8MPwg8nLymjwz8gf2ocUgDbVnA7Ud9YVFPqluiO1vWw3a8SQteqD0xdYw9Pk+1fgvLGrzM6C9Y83Z7+OokGwxBTh69qSawSctH1hLXtj8wDfDrxg9NCTWiE88ZDo1IypL9d36Hfxq5aKFw= 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=A6fUyDEb; arc=none smtp.client-ip=209.85.128.43 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-wm1-f43.google.com with SMTP id 5b1f17b1804b1-42016c8db2aso32121945e9.0 for ; Thu, 16 May 2024 08:13:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toblux-com.20230601.gappssmtp.com; s=20230601; t=1715872393; x=1716477193; darn=vger.kernel.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Pe5Vtdlgyg4X8O20OCekmLHTuiLDo63Hjvcy1VkxkQ8=; b=A6fUyDEbjhEZs3gCXlWi2xz9WP7b5MEsckD44elyFrg3mYo9Z9h2e0hVvP0mYPg388 Qx4d0evESs193xMZgOUROa6xvrGgx4acoiQy8itMuNWgGvHh+y8JszA7rAlvmczH8eHP Tyk5VYVO3MuR2aCyPAo/wv+8Oscl0ZruSKMtatAZDa5PBN6Cz31a2tBu/rHQUvzJd0ao rrtzmsQLt6aeINbJYa0JU6Mju9dn1MY9E8Js+x43iV+W4OlLpzo+asjK9NvFooKkJRvF xO6M7WC6yry3r1OPVBBvNrYLXY17pcax1sGN/QCQOZxEYCokGrASBNc7g8FQpJFN1sdT gl9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715872393; x=1716477193; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pe5Vtdlgyg4X8O20OCekmLHTuiLDo63Hjvcy1VkxkQ8=; b=jUVavGRauyny6J5FC9FsCgsoYcj/hca7nHpC+uW+tRWrU7nIgAkE8hEECl4FNh2BUq V5n+PQKC0IIHqmrBmwky7dBwkwn547ClDywLfcNXdrXCC8zZVjKac6+1Y5wDg3eZQmZ8 HyEsgeL1RCJgoVzu5EQG1Q1wyrBmeGIvY+lpaTIH0mOnj9EJo0Q364gavYuR20ly5V4i l8/4kO1Lpnc5Hk7ilTHh1ntmI9u2gUKPNrquS0vTDZXOhJwu2iMt38EL3pAFumNzM4E+ Dx4aNe1wkaaSE/88FLxF1pjYkykcG8/AEPVXR5D0Fm+ySBdHSEltRhyCm7dQ2uw4Hagb GhbQ== X-Forwarded-Encrypted: i=1; AJvYcCXVxlpmM3TDVoi6ecjC93gSjle9e83sgdY1yk6fKdTAUerYQF6GPRPfBhrNHa/U93+KHSxcOEc4K8So799KQXTVNFkd1Ouw5ELKeOfl X-Gm-Message-State: AOJu0YzGAKnLPfYeQN7fhGBPWXXuvLg/xUgD8hyvWSHfxM0sAVWCYdTv fnrpx2VwJBIijDgDLdtmx1guNt6VLSfHsYV9DWKpwsZJQhssespnGbp7z2wK/7Y= X-Received: by 2002:a05:600c:45d2:b0:41f:eba9:ced4 with SMTP id 5b1f17b1804b1-41feba9d048mr143258545e9.16.1715872392657; Thu, 16 May 2024 08:13:12 -0700 (PDT) Received: from smtpclient.apple (aftr-62-216-208-100.dynamic.mnet-online.de. [62.216.208.100]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccce2580sm270540805e9.18.2024.05.16.08.13.11 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2024 08:13:12 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: [PATCH] net: smc91x: Fix pointer types From: Thorsten Blum In-Reply-To: Date: Thu, 16 May 2024 17:13:00 +0200 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, kernel test robot Content-Transfer-Encoding: 7bit Message-Id: References: <20240516121142.181934-3-thorsten.blum@toblux.com> To: Andrew Lunn X-Mailer: Apple Mail (2.3774.500.171.1.1) On 16. May 2024, at 16:13, Andrew Lunn wrote: > -#define SMC_PUSH_DATA(lp, p, l) \ >> +#define SMC_PUSH_DATA(lp, p, l) \ >> do { \ >> - if (SMC_32BIT(lp)) { \ >> + void __iomem *__ioaddr = ioaddr; \ > > ioaddr is not a parameter passed to this macro. Yes, most (all?) macros in this file rely on ioaddr being implicitly defined in the surrounding scope. > + if (SMC_32BIT(lp)) { \ >> void *__ptr = (p); \ >> int __len = (l); \ >> - void __iomem *__ioaddr = ioaddr; \ >> if (__len >= 2 && (unsigned long)__ptr & 2) { \ >> __len -= 2; \ >> - SMC_outsw(ioaddr, DATA_REG(lp), __ptr, 1); \ >> + SMC_outsw(__ioaddr, DATA_REG(lp), __ptr, 1); \ > > You probably should use lp->base here, which is passed into this > macro, and should have the correct type. ioaddr is lp->base: void __iomem *ioaddr = lp->base; but the type information for ioaddr gets lost across multiple macro boundaries which is why either __ioaddr or lp->base must be used when calling the SMC_* macros. Both __ioaddr and lp->base work, but I guess you prefer lp->base? I'm fine with both. > @@ -1072,7 +1072,7 @@ static const char * chip_ids[ 16 ] = { >> */ \ >> __ptr -= 2; \ >> __len += 2; \ >> - SMC_SET_PTR(lp, \ >> + SMC_SET_PTR(lp, \ >> 2|PTR_READ|PTR_RCV|PTR_AUTOINC); \ >> } \ >> if (SMC_CAN_USE_DATACS && lp->datacs) \ > > This is just a whitespace change. Please put that into a different > patch. Ok, I'll change this in v2. Thanks, Thorsten