Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8E16C05027 for ; Wed, 1 Feb 2023 18:41:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230508AbjBASln (ORCPT ); Wed, 1 Feb 2023 13:41:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231661AbjBASlj (ORCPT ); Wed, 1 Feb 2023 13:41:39 -0500 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC4B06A69; Wed, 1 Feb 2023 10:41:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675276887; x=1706812887; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Nk2UjAD3MyqHuQla+/DxMZglQldIVZk+vp5CLUYP/LQ=; b=Kz/8ANOIGY5PdmMX8hmSZ4JjpjW5gfDUau6eeXRpf7eywjM0MQduoB6W oWR+Lw/jY7xjnTsy0uuNTRleiwtoh/aO+Z5OEzET0+/e/K7s/bV58fPxA FnrSpubbbCeYKyhD/nPeXIZw00l2N6pZnYB5yzbbEzc3FSsGzyQaCzAIP 03cBYfnIfRKzv6KZnJuKNRgbbGDP+L5MGgUoTEm/D9vA1Nn+WDFw0z+bq zWRXmafeFFfFttvhutC4ZxIkBl5xIduw8v+yq4WzPe8YDxwLgKRQNpxTB QHJyYpLXiE2Hl1g7q2eX19zxWPb5fLH8UqhPDqGNlGAKROoebQpwhAbvf A==; X-IronPort-AV: E=McAfee;i="6500,9779,10608"; a="328249072" X-IronPort-AV: E=Sophos;i="5.97,265,1669104000"; d="scan'208";a="328249072" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2023 10:41:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10608"; a="993793228" X-IronPort-AV: E=Sophos;i="5.97,265,1669104000"; d="scan'208";a="993793228" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga005.fm.intel.com with ESMTP; 01 Feb 2023 10:41:20 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pNI2m-000pi2-0y; Wed, 01 Feb 2023 20:41:16 +0200 Date: Wed, 1 Feb 2023 20:41:16 +0200 From: Andy Shevchenko To: John Stultz Cc: Yongqin Liu , Kees Cook , Vlastimil Babka , Greg Kroah-Hartman , Rasmus Villemoes , Thomas Gleixner , Jason Gunthorpe , Nishanth Menon , Michael Kelley , Dan Williams , Won Chung , David Gow , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Roman Gushchin , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Guenter Roeck , Paolo Abeni , Geert Uytterhoeven , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-hardening@vger.kernel.org, llvm@lists.linux.dev, Sumit Semwal Subject: Re: [PATCH 5/6] driver core: Add __alloc_size hint to devm allocators Message-ID: References: <20221101222520.never.109-kees@kernel.org> <20221101223321.1326815-5-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 01, 2023 at 12:11:41AM -0800, John Stultz wrote: > On Tue, Jan 31, 2023 at 11:36 PM Yongqin Liu wrote: ... > data->nr_sensors = 1; > data->sensor = devm_kzalloc(dev, sizeof(*data->sensor) * > data->nr_sensors, GFP_KERNEL); Side note: This should use devm_kcalloc(). -- With Best Regards, Andy Shevchenko