From nobody Sun Jun 14 03:55:24 2026 Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) (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 473C030E835 for ; Sun, 3 May 2026 09:36:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777800995; cv=none; b=c3HOM7p1cnw1uevWDp20h4YYUYUkP/6Hybs6kA98eC9UvEbHK17c7QZh6L9yeWo1Z3YLRF1W60SsJiP+jyh20lCbC5846gE0+1EYAq7y4jmKO2aVL0zL+zT9TeiPjVil1FqJ6j6TqtqXaAckLELrdke1pcH0vqYqBr9XBO+rWQU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777800995; c=relaxed/simple; bh=RXfgIjAGbxIo0UKBK/fu3hOlYZW4whqx2RazBg+Ujt4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NsIYmlWUpHtXG5IaWQlmUn+9BWVgyyCI/qqMzXfqzE5yf2PJ55NiChWcoOs8CN4HLQqdjw2xOc/cTbwqIsAgtua0uJdw4BvF7ybMIK70QZp5tEA9JbSuEQzvu7UH69ymEDdjRVcdUdy0ETsejxy+jzeWdzVQ1Y+6QMEEzNh0PLk= 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=jc7arA2W; arc=none smtp.client-ip=209.85.216.53 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="jc7arA2W" Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-36534668247so218739a91.1 for ; Sun, 03 May 2026 02:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777800993; x=1778405793; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eDatquS85Dk957E39/1YLiRAqp8ipy0ImMN6jRWaHFc=; b=jc7arA2WWx+exgblePZLF/fdmc5E7x9YcS6UlMrpYLAr2Xcg1e+1jYQ+/ystia3a2L yxZQgDyVH/hxw85JDLGITFSKgOuEIv2Ga6S1/aDx9QiO4/h20GSFxwf4L0d75uwdYDAM Ts7pHbYT0CSp85zkdkk24t451+R84or411xCQ9WdTJ+nQ95jgSc3rZbny81DXVrFijqp LtywNo8qG7pnJXHRYhVCcrim8Iuh0YNiG4Q274h2tw3IFcE4Xcu/BPPnUBX8rsmivQuT AWgygDQ6m4qIa/u45PJ42fou0kn7p+4WfqvpzzKTBPxkx+dAfBz2v+NvT2y5mDj1GRSV 8vgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777800993; x=1778405793; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eDatquS85Dk957E39/1YLiRAqp8ipy0ImMN6jRWaHFc=; b=qtD+MCafQQosBzSew0J7QBV+VT6EnGcs+oV9FnqrC0x0awukgZE05QRPWGif+rbur1 fsrpICEfiYCMXGD4R1r5ufaCBU7qeKzy20VwBFpuABEuHJDU05j1BQ1NsEL2c/ubvrEV aJTu/aM9T4Ek7Vuhb66rHy/d0MrYF2nw7lqgoDUPxhimcAQJUX2iqWQkYI8WY/rFErOz oqsDidOaSrhqSeWOVB7XuRe+7TUaoY/lATD7ZuvqqCoxKKRS+Xmye+2KtTtMuulaTfUx kEbGQ6q5CWwsX9k5ngR2BKV77Gx+Fj+oVq8JVLQX/2/khLTAiEmV4SWkOWQW/TuT9IpB POIw== X-Forwarded-Encrypted: i=1; AFNElJ9uIc4TRiGNIO/SHVplNH4NGjlZFf4P+bdtJNe5Avy1jwix2cMi5F9L7i+7W4E4mPLX7SwXnJ+3tTVhZ18=@vger.kernel.org X-Gm-Message-State: AOJu0YyT1FQTRFtMfj9Geo6vevAUWRA/+lPWLAna+lbKlc3Bo0V1Lnn4 eGdotvaRNmqpktuojsRA6VrzYnxzTUYOyJnuaLCBghE25DD5hX47lR0O X-Gm-Gg: AeBDieuycjWUJZ+e6GVQLFRQD+wQv058exKiWcdoRxI4XoL4sMcmH9mLn+4VzvJkkfw KTt9aB33g1owdNijIuMen08dQv5qUYGsOxQAq+IJVJ1FehSLRTL3mkbUDZhdO5Par3EzrcU9xIj cmjx1f2u2vCybUYRRXqYY8i3bJd0olL60R4yS/NIY6fv0KA7lWTW1PC3c6p7RjifE6S9DxkWwEQ g6btohYlOafYwSkJSgQsQiKq1yDvCCd//+G6Y3R8X/ydFDyqzKOw6TiWx0+1GvoaXT8fgzL08SR 5vyqc4MNDAVbgqbeePwxpzKa7pH9dp/c9A7KW1JpywLh4YxcDjuVk1xNJASy/VrNmxCaI41Kl93 JAnBTMNTJ/5FJJF23Wthr3mqYhtCrGd901x4Rt5IvhJ7xpO4EJ8Xtst9ww5iqS5Lzi8AGG6hi/6 0f65aThTg+09ONYIyi7yfqeLvOqAKyJSbHgwGvKKFTdGlZWprwhSWoF2NDnufRbRoCwPcbHyqYM nxmI7DI691c7inHNGjx9N0IApIFU2PcFfFjKg== X-Received: by 2002:a17:90b:4ec5:b0:35b:9b77:d7c with SMTP id 98e67ed59e1d1-3650ce8ef90mr5890966a91.14.1777800992550; Sun, 03 May 2026 02:36:32 -0700 (PDT) Received: from ajanth-HP-Pavilion-Laptop-15-cs1xxx.. ([49.205.204.145]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c7ffbbbf3a0sm6589960a12.11.2026.05.03.02.36.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2026 02:36:32 -0700 (PDT) From: Ajanth Badiger To: dpenkler@gmail.com, gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Ajanth Badiger Subject: [PATCH] staging: gpib: gpio: use sizeof(*ptr) in kzalloc Date: Sun, 3 May 2026 15:05:58 +0530 Message-ID: <20260503093558.68105-1-badigerajanth1301@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Replace sizeof(struct bb_priv) with sizeof(*board->private_data) to follow kernel coding style and improve maintainability. checkpatch.pl also reports that LINVAL macro should be enclosed in parentheses. However, LINVAL intentionally expands to a comma-separated list of arguments matching the LINFMT format string used in dbg_printk() calls. Wrapping it in parentheses would change semantics due to the comma operator, causing only the last expression to be passed. Therefore, no change is made to LINVAL. Signed-off-by: Ajanth Badiger --- drivers/staging/gpib/gpio/gpib_bitbang.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/gpib/gpio/gpib_bitbang.c b/drivers/staging/gpi= b/gpio/gpib_bitbang.c index 374cd61355e9..2fff9ec9a01c 100644 --- a/drivers/staging/gpib/gpio/gpib_bitbang.c +++ b/drivers/staging/gpib/gpio/gpib_bitbang.c @@ -1066,7 +1066,7 @@ static int bb_line_status(const struct gpib_board *bo= ard) =20 static int allocate_private(struct gpib_board *board) { - board->private_data =3D kzalloc(sizeof(struct bb_priv), GFP_KERNEL); + board->private_data =3D kzalloc(sizeof(*board->private_data), GFP_KERNEL); if (!board->private_data) return -1; return 0; --=20 2.43.0