From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.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 42BEF37CD41 for ; Wed, 15 Jul 2026 14:27:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784125645; cv=none; b=M2f4WNiUGPfzbse8Sk096Ywi2NGe4cpigpZFl2shCQXX3r/1F85JwXENHwh0J3shRSAg/Q2w+8GkicAEdH8QfXFzvAOSFr2cYjbhsRQqOdBBiK0OZR+/P8iBu1ZBjZ+9py3ey3R8j/6aV7eSe/61HwSQULc+Payxqk+GtCFnxtE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784125645; c=relaxed/simple; bh=M/EX/niHuBABx7Al7h7DYvyvfT2yXWCceFpb4orED5w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=p+BAwc7ff8s3NAklogWu7vltfG53e9XhKcyE+UhpydIbMRE03/Ajo7wxKUilj3NKy9L6anoK5fUz7ueG5FjtKyXYsqBr2WDLntt4N1Q1FfVPmbCJX7k9/XhFAYHV3243d1FUfVkxYNXa9UMbepiCPI7EdtyKKrXSHFmePutfLu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Gr1GVv4g; arc=none smtp.client-ip=209.85.221.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Gr1GVv4g" Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-4703bc0a99aso3423188f8f.3 for ; Wed, 15 Jul 2026 07:27:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784125642; x=1784730442; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=ZOfFh4PahtpfjrdklgafX2t/xlLfttQlqWiXtnmORl4=; b=Gr1GVv4g4Da9sRSVBZ2dPge4yIMF4DIUD20bw1MTpF1BH34pflypI8NGqPOpqVbeKe fsLzxa7CUiy/pZHhkUrkKirSWaNoGFo6EvpfKm8a5vq9r/Jgr7VWjcbOvPKR/HBfK/OL CtT0z4jXNQeAv1oYvKHKs/zEbiimyOcjpDDkpfwddhtyikuIajHof0Io0g6KgC9p+F8p zd/KpPhJ3XhGowgmDLV5HdUBTV3KfpRYFw0SPDrEsIar/M0dR87d+lv5ZV0DnvbznOPp nxpsBIm407uad8POBFxs1NCRHHmfz6EmNOktWTCFMmxWfif6fc6D+/8KaZp0LldXXRkI mSxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784125642; x=1784730442; h=in-reply-to:content-disposition:content-type: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 :content-type; bh=ZOfFh4PahtpfjrdklgafX2t/xlLfttQlqWiXtnmORl4=; b=D8chgS+/8UMe88qnV6C8iAIzjcfPhf0cZIjFpsaYScSOclG2qNYoBfdrYrvEH0OqRN Ws/MtZq4iTuutHXGya4eKl8WAWIKj/58dfS6IAJGbtz+sEXNOjzU9JXSvDjWTvgmT9lH Jb28X4+uTz4RimCKP0jzaHoBq36zkle+t83Ubez6+AYC8HYKNC+taEYUOVE4hpMvKZ04 F/KZh048pZDDJGhYQvSHgWpa6Ngcef4pbBxDPGInxRzvgaaR5s/YMlehDsMm2I/F07Vd zwYdNrTd4GAW422wu97Czrt7n6MOWL2UoyafHnFN6T1O/J+SrqpF+XsU5I6po80ztMV4 p6Fg== X-Forwarded-Encrypted: i=1; AHgh+Rr9If7S+Arvd/uPql7uVqb69hevr6m8ttTPmTIL0xNYM28P6DEHTkBKmeLfV7pKJ6eFr/VRQzkOmp3ocx0=@vger.kernel.org X-Gm-Message-State: AOJu0Ywi4uVa8sLAl1XuZj0TLlIvzSbMtZ5pn+MMSXYNo08+vI4K84Pg SzhUR52cgBzUdMG2gti23bH/OLmE5Eevb8innAxW01s3CQU5OfnytTc= X-Gm-Gg: AfdE7ck7Xj92DuyNugfxSMzwsAYq/aeMHr5eHDm8CfY+Gv9fpN4N/2n2B1K7GFM3fzV 4Hc/eVs2fX2hXvWTRD7byJ3Oqk+Rb8C+XJW2KxcJ7U0Q8MLyQbaZF1aKi6NzJCmFX4Ri4aYN5JT WP8QAcqbwFWpxm4B8nWnoL6gtW8IJUIpR+npFBV27xCnysWP/fcXAgYESdzGBCjKRrvW+MYeCdm jJnTF55qtU4yKC6HCaNLrYJZKwy6zv0t/fDKPZ1RstKLJwaeJvLuILJ3d7U3OOWmuhBc5K1YqdX Fe3zSiGIz0J5z90TOm+rTBuM3mMZeIukJlnSwYT0zSOg5tEZBuY7i2skMyjp4F2QpnXwSbge+vf Ix9Z+KccYoLi+7Ert8zWXS0P/QyEQQy2qzmqpQT5cuFTzyVlFe+nY4zDEq9Kz1QhBBa2efyRn6t KE X-Received: by 2002:a05:600c:42c8:b0:490:d354:bcf4 with SMTP id 5b1f17b1804b1-4953c28b5edmr22250535e9.27.1784125642067; Wed, 15 Jul 2026 07:27:22 -0700 (PDT) Received: from p183 ([178.172.147.87]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4950a2f9402sm154341365e9.13.2026.07.15.07.27.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2026 07:27:21 -0700 (PDT) Date: Wed, 15 Jul 2026 17:30:42 +0300 From: Alexey Dobriyan To: Vincent Mailhol Cc: Greg Kroah-Hartman , Andrew Morton , Rasmus Villemoes , Sakari Ailus , Nick Desaulniers , Alexander Lobakin , Arnd Bergmann , David Sterba , Ivo van Doorn , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] container_of: remove useless pair of parentheses Message-ID: References: <20260714-containerof_refactor-v1-0-b5c31164d2ad@kernel.org> <20260714-containerof_refactor-v1-2-b5c31164d2ad@kernel.org> 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 In-Reply-To: <20260714-containerof_refactor-v1-2-b5c31164d2ad@kernel.org> On Tue, Jul 14, 2026 at 08:18:02PM +0200, Vincent Mailhol wrote: > The last expression in container_of() doesn't need an extra pair of > parenthesis. Remove it. > > Signed-off-by: Vincent Mailhol > --- > include/linux/container_of.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/container_of.h b/include/linux/container_of.h > index 28500a62ab7e..68153170db32 100644 > --- a/include/linux/container_of.h > +++ b/include/linux/container_of.h > @@ -21,7 +21,7 @@ > static_assert(__same_type(*(ptr), typeof_member(type, member)) || \ > __same_type(*(ptr), void), \ > "pointer type mismatch in container_of()"); \ > - ((type *)(__mptr - offsetof(type, member))); }) > + (type *)(__mptr - offsetof(type, member)); }) container_of_const() has the same problem. And it should parenthesize first argument to _Generic.