Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp25184lqp; Sun, 9 Jun 2024 14:41:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4diwHCw3R9SuzPwRslVvcYCZ9UDnVkB1JwoaRYmdOORFpmfqIGouiPknLTGpd4ZeamL1PyM2vs85vXZWaqhrLKm0pXpt5dAzxWBoFwQ== X-Google-Smtp-Source: AGHT+IGUomj3b5T8WsfhPtp3ygzTr8hmhxAg4f4EbHJJKsRGunFGgZHvHNvtUD3XUfWeKiip2Mnr X-Received: by 2002:a05:6e02:216a:b0:374:9b99:752a with SMTP id e9e14a558f8ab-3758033c3dfmr100732105ab.14.1717969317367; Sun, 09 Jun 2024 14:41:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717969317; cv=pass; d=google.com; s=arc-20160816; b=CtCkIn3SDkVNNNSU1wiqLR+qoUeAlH1AasXxjwzJ2UpGkVn0t0BbCBH/LmQn784WgU IQ/PAuKEhbmno/FGbme5KABj9lwnkaniS3oi8HyaVYYEZoTZ76LeyTyVkbtHUl9zZRE2 IqWbIGR8aQZuvT/qYeWRAc4FJcdppRj8wZjPKj++2xvLtgXEw1R437rHIPtnsOh2W2xU rxa7UWyJU0uaW+yY1cyxF0mXIygkDYpmQMfdX4qDjELe1C3Z4NS07DqED97hIJFevuEW HqbQSLc7IOxumAPDaM4wgI9ebPaNMkQGA/o348HPOdNcRgGtv5PjkP0e+nsC/te/ZEt/ T6Bw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mcjlMxR8WC9GvF7wR1CGHb3xg0yhlQrP3Q+QhW8JPRs=; fh=sG9LROC8i4ScHmcfvSJqBsq6sKGlxD0uR+c3qzy3nFw=; b=Qo9I+SgiOJ5POTy0jxNObl8PeJPW5eFSSlMQOaVOG76dAWrV+HzvY4LhjE0QleGa49 D8QVtoW+HhmVITd1D4TNQ6U8oKtUrYTEaXMyyUGBorbYhoQeJDpQqtojeJzrZIWY4aSb lh3NvS8DFt7wwIxJfy/FSIyZ1A2+03JaHFkk9bHWiaGvqyOrHUujBskoGk2E/wvpasYo oPlobS/ocxK/9/ZodzXi6GHESNiurRGWKLbYjYHGT3EDrzYbUnYfihHuj2oa5XbKnQzy fEOR6pDzrgd0vx/1N5qfdgvA5chLlbwXa4qUW0sJLyjpQxzKRdQsw80+MI4IlYsiWKrV 0HvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XtvHpyYv; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-207519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e6c1317c1bsi3301388a12.70.2024.06.09.14.41.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 14:41:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XtvHpyYv; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-207519-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BE456B20A1B for ; Sun, 9 Jun 2024 21:41:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EA8C55887; Sun, 9 Jun 2024 21:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XtvHpyYv" Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) (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 4B6D21865C; Sun, 9 Jun 2024 21:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717969281; cv=none; b=kJ+dIs4WzvDa5fy1x9PLU67eELtxRgYVW9867Yn8Glwq7s5GPfwCGBoldHZTa9XZG2IgDvUEUYNUWWbTWiUVRa9e/euzKkgVeMNYk5ZXRGtKDQrM68TphcK7qHDXZihXc6Jab/nRzDP4Ek8tkdrBqHfb0MCW/fnWjtpvb9Mpex8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717969281; c=relaxed/simple; bh=kRTX5mjZmUNWGLllyyHVNH3c1pTK9xaLXWAa/EivX3U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WblZyi18t/z9GVB9VIyRMWxE3h2ooNmnrOseUT9ebAnj59Gft1mGvp3unFzFnBZILPNI9LdKsHl82B/SIyV3RkkwX0L1vWqshI5dJJ6OETZNaPjK92MS3yB+F1oziWe6maZCIqgMem+PEH11uzvRhR1ZegKNuORMta39W2Bs9Sk= 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=XtvHpyYv; arc=none smtp.client-ip=209.85.166.173 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 Received: by mail-il1-f173.google.com with SMTP id e9e14a558f8ab-37594abcee7so5972275ab.0; Sun, 09 Jun 2024 14:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717969279; x=1718574079; 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=mcjlMxR8WC9GvF7wR1CGHb3xg0yhlQrP3Q+QhW8JPRs=; b=XtvHpyYvYdcLaU9a7sIxY8flkiDUSfnLneBTBYKEtauMZSCwsX/M9G9I8H6jbocosM A66puiYlC4BsERxyEqsZL5MsaJflbm/2UxbHjTcgK4+9HjlYhqRfhWp/oOM3GpZpc5fx tnqiIaa3p7qflt+i3Mde7haJHZC3mq1E1XIeMCLuY4uGSrRax67C4QVB4vC0pzoReROG ziuVZqNLPEgVJ6ptNglgUyF3zgsj+2/D+pxgR/JlZNqT0SN+f5Oxk9Gxec/9BJTZjfgw rSMO8Xyw7QE4sJU5896PAVF0kxAT6ZzxlM4QwIStgpFvhO4exRoorj7VEbk8lFriE8zC MsHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717969279; x=1718574079; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mcjlMxR8WC9GvF7wR1CGHb3xg0yhlQrP3Q+QhW8JPRs=; b=TnMrWwUHsHLUunr3AFjVGdhod8sI1n46u2r10e9lDRTBHW4iNC2NJe2NuxXLt+i/D2 CKJkGJR2ZUk/1MXUXi821RPA3gZpLAVyhDT5jDkObHEhbwNV3KPP/gYnTaTB23e0tpTc 7tQ/WmVhxoRDUpQ6VR9q/FatB2qnXSU8/hkyE6pvuIJ+nuvFv7T3NZ7vOTKESK5RJjFl IIZfPC2BU2m+5e/CFFcwMXkqK6M9XQdEXQX7L0lF5fBc0OnmZTtgOQv9mrNq/tPW4Kg6 t1I0QttzeGZKaw8okqNu+Gp/aKN2xzy7/ZuYs8UrcNeDnNKgdVmF/4dzJ0JH4QejNhqK cgaA== X-Forwarded-Encrypted: i=1; AJvYcCWDshg2KkbhQKGobaGQaAzhMPXZK5XlHEmdlqS/498GBQTwYjLeu6ws4UuvS7HGHz9W1fgg/lGDapXiIlHZlfRf1nBuUVuFZQrnQNism6cEDUORSxlo6W+oMbdCeax+6rX4mVeu3hAKKpxkQatPA5drRA0ExdZqPPI3oudPjawJhv3i1mvi2He/hnM= X-Gm-Message-State: AOJu0YxnZfXAo8VWdWHHB5hQHv2y/J8K3WjcO7LJH//Z33gP1mPqMvtu 6A4TCYymp1jTPXTOLz1vydCqQ5scXNFqXxDv+RU77L39i43GT/D5 X-Received: by 2002:a92:cdaf:0:b0:374:a963:be9b with SMTP id e9e14a558f8ab-37580331e2cmr105686145ab.12.1717969279412; Sun, 09 Jun 2024 14:41:19 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:55a9:13e9:dec7:f9d3]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6e3575b6c73sm3549648a12.78.2024.06.09.14.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 14:41:19 -0700 (PDT) Date: Sun, 9 Jun 2024 14:41:16 -0700 From: Dmitry Torokhov To: Erick Archer Cc: Linus Walleij , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Vicki Pfau , Brenton Simpson , Max Nguyen , Carl Ng , Matt Scialabba , Christophe JAILLET , Kees Cook , "Gustavo A. R. Silva" , Justin Stitt , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH] Input: joystick - use sizeof(*pointer) instead of sizeof(type) Message-ID: References: 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: On Sat, Jun 08, 2024 at 05:13:57PM +0200, 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). > > At the same time refactor the code to not use assignment in "if" > conditions. > > This patch has no effect on runtime behavior. > > Signed-off-by: Erick Archer Applied, thank you. -- Dmitry