Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7731742rdb; Thu, 4 Jan 2024 06:09:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+tbJI1yVa+B82tQC1rMhbtTkZqZedZV87lms6XhNhUSoQSh45oANup5eQjVIOf8xnER+X X-Received: by 2002:a17:902:db0a:b0:1d4:1999:d9ac with SMTP id m10-20020a170902db0a00b001d41999d9acmr563181plx.94.1704377345699; Thu, 04 Jan 2024 06:09:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704377345; cv=none; d=google.com; s=arc-20160816; b=eSn3t5R9VSpwGCMeRL9D/TTeAFSZl/xlIupEgYKk2s2nk410VcBSvVjLtzDBIPQGzH iWQImMBog5lYwWyhicnYcLHz9NaVu1uPmvNeVX9QqkgoXHEPJwSXV8gpHEmNH7PqPgQT 3QGpmZcKm6vDWt6vF/H+pJmuwsDKK5K5+aIeCosrC+2tz85uKTCi+/QhUA6NTTTV4CPB RjqAbUYwKi8uY2fEszbWnXPlAnoPIsPs4QudePhJgw8nLMbUwPwbX+otE3squ/Iau7um MSg8pj5WzH2iI6dvdjptNSk+J6L+NCfT4KZQAzYwgnESttx07yR7LAK+IUslmMJNSsuu +t8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent: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=HoJJ0zAeIazoo1EQZbHCtVJoKQByFciovvb6JqxXPos=; fh=3y2erewAwTt/0bL2zF3FJ0/lJfEnkX7J2pat36QHnUc=; b=c+xawp78D+TkhPxiY7mTdHRiR0IipfsJb9MiMLHZBy9I6lPm1F6SZuQYQ0OH+5+xKd iJVXWotAYT+jKGp4BN2J8gvLSjNQJ0gEBOxmpJ4nWX1swrvPGQZzmBRdsGk0kvLCl0kz hJY6RdyqeRz9gn/FBfpOHItEF+P9ZRLYeUGI2CtU4PFD7B2LZgDO9NdAMNC97QUBbxMc aw5gKHRII31Jn4mmvLCtuQaFYtE7rM1MoqWusTju001mfad3EhpZXszik+x/kSrgbyU/ sZscPGMx2vW6CRrGMB42KP/DPhb17KJLyV2zhR+zMiXldkiwX87Ifjwvoi+GP8z5XnmH /JnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=I04Ax1cp; spf=pass (google.com: domain of linux-kernel+bounces-16750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.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 iz5-20020a170902ef8500b001d37a3c20fdsi23033317plb.294.2024.01.04.06.09.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 06:09:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16750-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=@cirrus.com header.s=PODMain02222019 header.b=I04Ax1cp; spf=pass (google.com: domain of linux-kernel+bounces-16750-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16750-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.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 7ECB9B209AC for ; Thu, 4 Jan 2024 14:09:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2ECD224E4; Thu, 4 Jan 2024 14:08:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="I04Ax1cp" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (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 90188224CA for ; Thu, 4 Jan 2024 14:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4046bEgX022991; Thu, 4 Jan 2024 08:08:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=PODMain02222019; bh=HoJJ0zAeIazoo1E QZbHCtVJoKQByFciovvb6JqxXPos=; b=I04Ax1cpzLGXs5eV+UYFkUJlQW+ym7a +w5wx9MUYrYTzDp9l0I7j2h53qgPC84/8w8xiJe1CdUtfCPWl9doVS6wAifR5lmG JwHoqq+fknUDRPl+IyWx4Xv5Rg5vzNt75wXPRBh6HUUka5TunK51mPwLk4EfeI+h PtwrpncE3PxrLjBYTeDSpvzHRrtz7aL/yhP8Bq0KMLjXQF22IBr/cPsyyBSbJ+sN VIl5m5w6bNq9xD0GDbFWgMEoOuU+5Fs0iYp5JlD93QDP5ozertAoqR0G9SWjqMz7 L440AgOmNX/1s1RTtd9WbzuvESA/6a0bxokD2zeJ3AXeXM98VmTXNjA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3vahg2etp3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Jan 2024 08:08:40 -0600 (CST) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 4 Jan 2024 14:08:38 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.40 via Frontend Transport; Thu, 4 Jan 2024 14:08:38 +0000 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 8F1EB474; Thu, 4 Jan 2024 14:08:38 +0000 (UTC) Date: Thu, 4 Jan 2024 14:08:38 +0000 From: Charles Keepax To: Dmitry Antipov CC: Mark Brown , Greg Kroah-Hartman , Subject: Re: [PATCH] regmap: fix kcalloc() arguments order Message-ID: <20240104140838.GF14858@ediswmail.ad.cirrus.com> References: <20231220175829.533700-1-dmantipov@yandex.ru> 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: <20231220175829.533700-1-dmantipov@yandex.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: Q_Y_tU77_X_IfFYRXl0Sa3rdCWneEQAy X-Proofpoint-ORIG-GUID: Q_Y_tU77_X_IfFYRXl0Sa3rdCWneEQAy X-Proofpoint-Spam-Reason: safe On Wed, Dec 20, 2023 at 08:58:19PM +0300, Dmitry Antipov wrote: > When compiling with gcc version 14.0.0 20231220 (experimental) > and W=1, I've noticed a bunch of four similar warnings like: > > drivers/base/regmap/regmap-ram.c: In function '__regmap_init_ram': > drivers/base/regmap/regmap-ram.c:68:37: warning: 'kcalloc' sizes specified with > 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args] > 68 | data->read = kcalloc(sizeof(bool), config->max_register + 1, > | ^~~~ > > Since 'n' and 'size' arguments of 'kcalloc()' are multiplied to > calculate the final size, their actual order doesn't affect the > result and so this is not a bug. But it's still worth to fix it. > > Signed-off-by: Dmitry Antipov > --- Reviewed-by: Charles Keepax Thanks, Charles