Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1240502lqt; Fri, 7 Jun 2024 12:00:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqNmIi9fJHkXHnng9EDL9WbWUhDw3qnANqfGTUIUWuxYg3NfROJDbFPjL/JduWzOPbktsGfxQb56sl4DGE4moBW4hAmTBqCjAerWSalA== X-Google-Smtp-Source: AGHT+IHtAGWIbo/UQr5X459kSSGWMQZfOJaWI0DnXMaAwokZ4MYe8bG3Sewggc8sB5AWdjYwHVkQ X-Received: by 2002:a05:6512:464:b0:52b:c296:902a with SMTP id 2adb3069b0e04-52bc29694a8mr882849e87.5.1717786850508; Fri, 07 Jun 2024 12:00:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717786850; cv=pass; d=google.com; s=arc-20160816; b=HFstHlUAWG/S9Ge1aO9oh9bxBHBrDyBmT7vLvhGJo1pk0lL9lbVjZXD7saLKf3v6EO uWe/HOdu63jQJHe1vZ7LW6tfSwimXoBZtA6bHWKMUIeoZJXy6Ub1r/g8aUv7oJGZu6PG 3giZAWtfXTpqGr4OHTnN3DEl8Cok5ityfAo3UWFbxQpPINxaZXxFYwNDAI5AkU4Vmhwx iI6eqcD8Zc5c72jQY43ckaaI5J0s/FU/8JVdhDa3NmbUJhIuUuiESEd+7UTtokSX1qsX yVmEHi6bGldks3HczzrixcR0hZ2EDAtjlbn+FlJhrTo2M5SWNT+tai0ogLRgOw1orgRD T12A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=i/Jy8qd4uKOjyqa8WqBy63oVESkVxbiZ20RIRjrKS9I=; fh=+/rV08DQzuqYx20MwjHMLCsv9cSg8p81oSy2Foj56K4=; b=gkgqCkdYbCks2nTzYOHOHqJn/Ytc85ICe0HjBXs47L04yxVrUO4F89tFf6casBlJIj x7la4UXaP1RyN3ynh/3DUzxA6sfC+SkDztlZRnyiplB0fNxrdOLFmA8gcxioX481xngu CNF5KjIq7hrPRuvmcPwxFOU7Fl2I7jSKtG3djRMUzIU2Qo2zafrFTYDqNqi8fWdRdXyV HSSsUrHC/fyfw3n4Kk6QfOSVwQCxniVshW6ayOIbBQf5/XTXz4MrOToJlpnyaL0QwHAx GB2Fnc4ztANpObd7JpzqxwbeJRnAGqXK7Jy3NQGthTd73hCBcQocw04a79/uOVf6TDdP Y2ow==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HMmKY4kO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206640-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6ef84b0277si26573266b.627.2024.06.07.12.00.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 12:00:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206640-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HMmKY4kO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-206640-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206640-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 0CA7D1F232E4 for ; Fri, 7 Jun 2024 19:00:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60CAD4F20C; Fri, 7 Jun 2024 19:00:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HMmKY4kO" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 7E94433EE; Fri, 7 Jun 2024 19:00:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717786841; cv=none; b=NoDcVw5v9v8l4vQQiAEMrHlGjEgaBxDbDVZs11p6L01PYx1MKl59Mg2mbPnWrXbz6c19kp3Z2LIN7jgdqsRpqplFVgGs8OxPN9oZs+IGF3A1qFkUHwij9760Xrv1vJYq84IfS1UK6sesFAznpTlGEssNiLAlJoJvekXbsABj1F0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717786841; c=relaxed/simple; bh=IPM3ZjOOoKK9XZRO/WkOmRAqEmZd5KnB0OIVkFoyJt0=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=K0u/8MjzR0KBRnimrd4L7x1WkpQaOZ+QawxsPR1Uiy+3meF8djX9qISB3NZvT5NQy5BshRoV8opM6tFRaCyTmeNU9ScNKyT6h9YTSgx0q8KCMkCT7pQAypxvUK3yaxCnsgHfEhRjpA17+O+JvSgD1cMvoGzcvKXCodYCrzVRnM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HMmKY4kO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0841C4AF08; Fri, 7 Jun 2024 19:00:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717786841; bh=IPM3ZjOOoKK9XZRO/WkOmRAqEmZd5KnB0OIVkFoyJt0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HMmKY4kON5jYIpNgJWHAqigbtXut0meWxfry6TCSfOf4J90q07JjF+fb7JOERKuUr oFTNwv/qfpFZsF9YHywvujdVx6o+lOwa4D8e+sUWCQl6wyPPgDEGYK761o3+X3K0Y9 OxqETGzOVHuhskjYR1qFkjmZv1PsCZRF9J7c6wmeBHt7/Mv+0kuaJJQqxS81AQoT+V Wy14eBRqFPkmpQOZteiBKmXaaCt/Ct/EEiyeTIAbxqvzbQTBclNWhkg8OThWHVPRFo rIasBBJo4nJR0GgLTHrlHI7ZFkbgkAkoFCmIMBSWs6gIdKf47qzXyz0bHtwbE+Giyk jM4ka91SBxF6Q== Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-3d21c5b48f5so10200b6e.0; Fri, 07 Jun 2024 12:00:40 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWyQkvlhipV2yBTjXii0PvYm9X3/HRLxpPmZwXLm2ncj1GHS+dDc38xmxPgonGZphBDOnwlwhgqKIqZLuAp1JxmBItDVrFPGA+c5fTtpSczep+jhQb9TfUB0pTGRm/C30RZxeFpa4eT90RTwUPaQZK9G0vZFYQ8YyAoal4mSnKygV4Wd9+cX44= X-Gm-Message-State: AOJu0YyYvKtiAUrU5Tz10zLhQL2vOPjG98dZ4EYKF2xb/cnBCYM2onGj CXwHU7Oa8K8j5mSjNNrrs3KDp2bCcTsKgHoA5t6t4veAP00sVmGLkCh+waRkczLJXBKycjBv9GN Yd0oc2DJcEcnr/g4dGJ7HBXIxdZ8= X-Received: by 2002:a4a:a7c9:0:b0:5ba:6959:edf8 with SMTP id 006d021491bc7-5baae6da3bfmr3518182eaf.1.1717786840309; Fri, 07 Jun 2024 12:00:40 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 7 Jun 2024 21:00:29 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] thermal: int3400: Use sizeof(*pointer) instead of sizeof(type) To: Erick Archer Cc: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , srinivas pandruvada , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Ard Biesheuvel , Sumeet Pawnikar , Lukas Wunner , Kees Cook , "Gustavo A. R. Silva" , Justin Stitt , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 6, 2024 at 7:21=E2=80=AFPM Erick Archer wrote: > > It is preferred to use sizeof(*pointer) instead of sizeof(type) > due to the type of the variable can change and one needs not > change the former (unlike the latter). This patch has no effect > on runtime behavior. > > Signed-off-by: Erick Archer > --- > drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/dr= ivers/thermal/intel/int340x_thermal/int3400_thermal.c > index fa96972266e4..b0c0f0ffdcb0 100644 > --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c > +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c > @@ -571,7 +571,7 @@ static int int3400_thermal_probe(struct platform_devi= ce *pdev) > if (!adev) > return -ENODEV; > > - priv =3D kzalloc(sizeof(struct int3400_thermal_priv), GFP_KERNEL)= ; > + priv =3D kzalloc(sizeof(*priv), GFP_KERNEL); > if (!priv) > return -ENOMEM; > > -- Applied as 6.11 material, thanks!