From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 D0B242F7AA4 for ; Mon, 24 Nov 2025 09:45:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763977554; cv=none; b=LbQlq0lEWvM1fY/n8vGa3oIIQKyiRczpkYvm4pDzZD1lz668hX5RzLr8XW/rp2E+KZFvTJX08lvLfMNCSW9NrEsJzwIJJqv7uOPWH+abBRX9ClAYsQ36K2ML4xYk9xlIa7LL0D6mfdS0mRYEZoOoq2NjQbxIHz4M5li5F18oF6M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763977554; c=relaxed/simple; bh=NvYF04v4eCx3yl/s7snQRfvX6PPL89nRAytI2UwqFPw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eGBZYP93tq1xlEPhiyexKX01hZ7HE0rZFewfTJgo5pE3wgTvIM5R2DLe+LLUQYiRvNtFO4J9eBkZ62mqfyII4Ekjaclbaz9VF7IinmxWd54KqkTWBFvJ+naVDtprBzlHD8KF48r7eifw9ljoQaP69DQDSurJY18sBVDqk35JUBY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=zKriNBcN; arc=none smtp.client-ip=209.85.128.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zKriNBcN" Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-477a2ab455fso43902185e9.3 for ; Mon, 24 Nov 2025 01:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763977551; x=1764582351; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=lMaT/17n5xtGeyxsqkTx7z8vnnLBLj+qyVWsvskIkIM=; b=zKriNBcNEkVC82E9Wybh7aelnK17lcgdNvxRxmvswoP/KMKmErJunYIyxL+IIvt2JE jb5b3fRvh7YLL9UX32snkG95T5G1ZmVroJo1rjMi6+4BqJ30+n9hIUG1qhR+P3L/Q4fh LXVdNx3eaeKcsZzU6j0AF0nIwiZaLGJ+VkhsZ9BrzGjoj4vhMOl8q2RxxNDdm5V9f2Xx ETsn1niXrxoe2w21yVstG2pzRehUgSesuoC4WJQYaLKn7U5/Yte3p3Fp7ewIiDmIh1lB M5kjJ1CNB/2kjPKHuX2k/FjtDRh7T62BDvNAcBw8FhXYult/4DXn2pWmPydftF1YF0oc LgDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763977551; x=1764582351; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lMaT/17n5xtGeyxsqkTx7z8vnnLBLj+qyVWsvskIkIM=; b=N1US8rh9XXgAwnTOe4d7F+h/J4BtAWvdIdzjPaE2IubntG+Ro4NBEvaEMT1sBm8hGn sVS4uC2f742CST5xwC4nPHKQfb5Z/dzaloXtr25awowucS0tiVzOOMyR3MZlGmde1gsu 8RhTctUkVwTp09FL4supXmsEW5AzdsQMswdYPFzYIl6++v2cfKNz4tZJA2LLn72SKlBa HpQ23Q8sTo+gNhN9kfVeg9svkGZwbyyqnlevaxVOU+psnSNpf1SVlouEpHXjuI6BkRlC QuGxB+i64XYbD48VtCIG2xWjYBu+smzKhu9ljyxDLkcN8F+em1se5kS4vUscTNwK2Jxf kS0A== X-Forwarded-Encrypted: i=1; AJvYcCUQ3lUdVTtSwqMMMsEIwn0/uzR9v+uo394J7lv5WSsf+d21Y5DPhOC+u5yPrX57AoCQjN4uq6Eqtpb7Y04=@vger.kernel.org X-Gm-Message-State: AOJu0YyNkmG9wGltpxlcA/pOOQBptqK24fOEqxSxMq7JqA3IpbM1WLkj QX4Hc0+ZtcjjjKRTfmMOC66s3ynECyojGQi71ozae2Hf4aXxT1J7KsPMF9ZHr0PttvY= X-Gm-Gg: ASbGncu6bZoGKdoc78M6a6YKg0TqZVFY8xFk/MQcbk0PbXEhBiupOyjFrXf4PzhLL5X MOOoZxz+JhHrzp14VTmy5v14gMw7Kc1Z9r3iZBd7v0DP4ZLsHo4BuLHGSd2yz5WKR/IgUb1L195 p3npNAOh+W2wygqBiqnw0Q1lGjNpq4ihmxt61djs4BnzZ3ZlIAPG0xYdNlvq++t7v8x5GNlEynW 8i6pSpEPn3TExWC38ta4KMfdNMyx8iEsWkFcLjzWYRX3tYMpI70Db0+9NcXWlao/fM08dpX3otL rpdN58XkDoC00NSwPOP+l6+zD2eh/9x+dIXicwGYOzpIcyo8KR5VBaOx3NwC5vQCHvT3FCjrCpI cmLOfljqkiiygBCBWBkJAwBH6fKxlAdVHPUGoKv3qHz5itomJ0s3ogasFsyRgznP8ytRw9EsJjC tHdB7Q5LfRzdnI/IpE X-Google-Smtp-Source: AGHT+IFpEPtNwiiXK5rR4a3dHCY5Nvt0T4NQXTuZ2M5JULq2xSYX/7OqQfJCd3eyFUG71XzaQg+56A== X-Received: by 2002:a05:600c:3ba4:b0:477:95a0:fe95 with SMTP id 5b1f17b1804b1-477c1123ae7mr155874075e9.24.1763977551146; Mon, 24 Nov 2025 01:45:51 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-42cb7fb9190sm27321151f8f.33.2025.11.24.01.45.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Nov 2025 01:45:50 -0800 (PST) Date: Mon, 24 Nov 2025 12:45:46 +0300 From: Dan Carpenter To: david laight Cc: Navaneeth K , gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] staging: rtl8723bs: replace FIELD_OFFSET usage with offsetof Message-ID: References: <20251122174555.215109-1-knavaneeth786@gmail.com> <20251122174555.215109-3-knavaneeth786@gmail.com> <20251124091754.7147dc66@pumpkin> 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=us-ascii Content-Disposition: inline In-Reply-To: <20251124091754.7147dc66@pumpkin> On Mon, Nov 24, 2025 at 09:17:54AM +0000, david laight wrote: > On Mon, 24 Nov 2025 11:08:35 +0300 > Dan Carpenter wrote: > > > On Sat, Nov 22, 2025 at 05:45:52PM +0000, Navaneeth K wrote: > > > Replace usage of the custom FIELD_OFFSET macro with the standard > > > offsetof() macro in drv_types.h. This improves code readability and > > > standardization. > > > > > > Signed-off-by: Navaneeth K > > > --- > > > drivers/staging/rtl8723bs/include/drv_types.h | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/staging/rtl8723bs/include/drv_types.h b/drivers/staging/rtl8723bs/include/drv_types.h > > > index dd9018aa4ee5..47cabf8707f6 100644 > > > --- a/drivers/staging/rtl8723bs/include/drv_types.h > > > +++ b/drivers/staging/rtl8723bs/include/drv_types.h > > > @@ -173,9 +173,9 @@ struct registry_priv { > > > > > > > > > /* For registry parameters */ > > > -#define RGTRY_OFT(field) ((u32)FIELD_OFFSET(struct registry_priv, field)) > > > +#define RGTRY_OFT(field) ((u32)offsetof(struct registry_priv, field)) > > > > These casts to u32 are bogus garbage. Delete them. > > Dunno - they might be needed (or have been needed) to stop min() > complaining about type mismatch. > They can also stop expressions being evaluated as 64bit (on 64bit) > which may reduce code size. > But that is a bit subtle... Actually the macros are unused. Just delete them entirely. regards, dan carpenter