Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2459720iof; Wed, 8 Jun 2022 05:31:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJ4WPwsuinYU71KIh0KAjHv91r5Z00qatHjHHOz29T/P7HEOaI2K2z6qSsf9TOvu3GzEkG X-Received: by 2002:a05:6a00:814:b0:51c:1878:4943 with SMTP id m20-20020a056a00081400b0051c18784943mr16017264pfk.62.1654691510605; Wed, 08 Jun 2022 05:31:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654691510; cv=none; d=google.com; s=arc-20160816; b=ltQLKDkKaYfveXDYd9gJYuYNbZ860LFdORXVMKqJHmd+DURiYAMXApEEbTZJVCglH5 0JO9HhKgqo3HD7AdyEhWD6COORfYZqep2T1dz4D8w+ou7Pnumrs25hq3MdFIRa2BuNto 1Q433PM/1Ot/Q4JbI50tJPH2W38KM8UJtmN2hGUkZ5kUhBi5ehBXbp4kmmA0fu/tT7IZ mEg5dxr3ix8FR9Hsp7GQSJi587zWldJ4MvWtzQusvm+fmfKupGCYFaf4UK14GxSp20Pd hSsjQkxT4xeY7KMzMWAIi2YpiEl3xEUrI1l3Davt8EWAJFISWgdyEhH2IAnm79DDjtLq oH9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hQ2Lwwenk5aazxnCrrqatd7OpGHXTQl/RpjFWQ2oU0A=; b=zOsI2t93EoHOQKP11p7fdxJ1TMtkMFL08O0gSdRIUGpzI1rRxtvgp6lclGtzCN2L9W iLQI/1n33+aZay3O6TW4SJ/KWJRse+sHDSYXSCYvydA/XtwUaTkE3kl5DwYRDRqouu02 Sn5tF1NMLuGt9jFFmeE9GSFLL0R0CnRAteAvA1K/oOaXVLAT4HTMZmk5cyayCFFkiz2O TTOyojLWWQLf8qBz8XHq15qGxqW4TH3VD7JTg8pX7OWU4prWNX4znt5Qi7C5PUF4WMsm 7PJu3jG0o4s7NjoGkORgIvkKXp56+E5VZ0RlUpM3/stKjOo4ZQ6B5zzMl94dE2JdSgZb 1Abg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fZWKYlmH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p3-20020a170902f08300b0015f1388045csi23809307pla.156.2022.06.08.05.31.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 05:31:50 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fZWKYlmH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9EB30253FF9; Wed, 8 Jun 2022 05:04:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238667AbiFHMEY (ORCPT + 99 others); Wed, 8 Jun 2022 08:04:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238591AbiFHMEB (ORCPT ); Wed, 8 Jun 2022 08:04:01 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5F1412296A; Wed, 8 Jun 2022 05:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654689840; x=1686225840; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7mwdJlzZnKa7PggcpT5MZpyo4vsvD9fXoagVYkh/obk=; b=fZWKYlmHKRWFaMbKa1Xy7BZY0EULjp3C+mN3FwWZ/l4DGGSZ11yTGa9h 9tnuJFR/oFuwh6HC92klrDDWu/hutnSB0yt7IwDQLKR2doZ0vu9+T/t1O Y/LSXent88KHl6c/h3EJ0fgkrUoDDhi2K30EHnZTGwCY7RMEiy3RxTrrE k6Qm0mizTnnPJJHZc5kFftNESmdObvW0MMBeLdmt0vX8x3K+Sstjb+/wr gfVBcWSJc2S5/Y1L5FfOIjC5Mn5UMpY8MV4t/AtOD/+aY27CJuut/4Tjf 52qYZeM1M35Qk2rcrmdJjRLYumxOVMm4P6I7AplQqBu2RN4R5u7ExNVnW A==; X-IronPort-AV: E=McAfee;i="6400,9594,10371"; a="265675615" X-IronPort-AV: E=Sophos;i="5.91,286,1647327600"; d="scan'208";a="265675615" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2022 05:04:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,286,1647327600"; d="scan'208";a="670517792" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 08 Jun 2022 05:03:58 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D901056B; Wed, 8 Jun 2022 15:03:59 +0300 (EEST) From: Andy Shevchenko To: Jonathan Lemon , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Richard Cochran , Andy Shevchenko Subject: [PATCH v1 net-next 5/5] ptp_ocp: replace kzalloc(x*y) by kcalloc(y, x) Date: Wed, 8 Jun 2022 15:03:58 +0300 Message-Id: <20220608120358.81147-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220608120358.81147-1-andriy.shevchenko@linux.intel.com> References: <20220608120358.81147-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While here it may be no difference, the kcalloc() has some checks against overflow and it's logically correct to call it for an array. Signed-off-by: Andy Shevchenko --- drivers/ptp/ptp_ocp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/ptp_ocp.c index 857e35c68a04..83da36e69361 100644 --- a/drivers/ptp/ptp_ocp.c +++ b/drivers/ptp/ptp_ocp.c @@ -2155,7 +2155,7 @@ ptp_ocp_fb_set_pins(struct ptp_ocp *bp) struct ptp_pin_desc *config; int i; - config = kzalloc(sizeof(*config) * 4, GFP_KERNEL); + config = kcalloc(4, sizeof(*config), GFP_KERNEL); if (!config) return -ENOMEM; -- 2.35.1