From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 A3D7B3D34AE for ; Mon, 30 Mar 2026 13:14:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774876493; cv=none; b=LjABcFnSi1FxJgYrQzOAksV4aHzPwYn5GrzVyrTuB1GabxTN+LiJGbe+IBizmBicJkp0SfI9thCkSI+d3NMSK9IiLnWMlNIzWZ/fGPt5FFZCBGKalMwxHJQ6wKwRlkPYxcXE1bV2gAkiw9e6D1sfvdZObj0QIm/T9dat50y7og8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774876493; c=relaxed/simple; bh=xWUiPtmlg3QaJR9RozkQ2x30hLtcVMUG8ldWdWVlZh0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Hy//bELXXKhqigYd1/mjgYsr4fidZwb/xK3EFg4fMSWaDEG4jxMy5vrIvWqhB057P4gOuUQiURtDsGOOZIQgosIiQV4XlIXhFPQmoMmEx35Krgf0WPwPMpCOfZJOj0ZAXWYOp4pbG9eRmQPdxz47BrybaHq2RPqAhNnpA4FI6mM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=doIa/du3; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=Qa8qUj2c; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="doIa/du3"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="Qa8qUj2c" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774876490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zuPmVUCOxYLavRuCQ5BksODHBoPyY1J5S0oJ1KoaoEs=; b=doIa/du3eg+OveIGSU/EOdeBelpVlG8pbxtzGY+smqkq6Jw0eyP0/mfY/TPsnchj0fS3Hl FZPs/26nBBt38Kr8BXvc0j9ELQoFRBtRNqIgBpLOPW3i+FLlObvIFCxlw+C50M4oAzour5 vXtY59xu7ADmjNRhbhxeliTpzZqKQCI= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-284-3Rz_A28TNiiRWcwUf-M_qw-1; Mon, 30 Mar 2026 09:14:47 -0400 X-MC-Unique: 3Rz_A28TNiiRWcwUf-M_qw-1 X-Mimecast-MFC-AGG-ID: 3Rz_A28TNiiRWcwUf-M_qw_1774876487 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-89e56a8c863so92382646d6.3 for ; Mon, 30 Mar 2026 06:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1774876487; x=1775481287; darn=vger.kernel.org; h=user-agent: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=zuPmVUCOxYLavRuCQ5BksODHBoPyY1J5S0oJ1KoaoEs=; b=Qa8qUj2cMp8Mt+Kr7GH5Kp2p8/6VWrfG6EO3pqNS/JaO9J423w9YSWZd21EqDcRCB6 DxHquAMETpKhaccnPWQ+82uuOwn45rQJ/4nt387i5LCZab0py8+gTZc6NlCTI2nQ1E1Y FXa/E/5yxX3zeR+C82QwrIpHDdGBNwCTsl0/JImRhxES/yIUZES1rZoIEn/6MsFxb+CW 7BwnqBlg6yTcjvhn76j/Tuc1iRCEUOhwGUKEPxp6xE7xcbgxKr0GKMPb6ggEODKP22L1 ptI2JoAwvebaAnEPxpMtvpDeDSzXTgB2P7OoAAAs97argA4LkL6IbkhPzj9NvSpjvh96 2+Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774876487; x=1775481287; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=zuPmVUCOxYLavRuCQ5BksODHBoPyY1J5S0oJ1KoaoEs=; b=CVKtDv300o29YmnzhcjHnkkxZqHpF0Uu9EJRhgqrSkbVpo7KsXvtI2d2D+u6GXjp/1 ALySMwZa2fWw9T+m9wZoM19NbdD7qpWUL365KXEW5gcmI2QFcEbTBzQ4BCL0dvB8JpDO /OD/m+E2z1IdUeHpM7s2qTayW5Qs4NWSQqBdFYOIdW3oZOaNE/CK5W3vw/cH5fqMi3jW 6YPsYG3mcKLW98+hw1sQUa5n7w876GBKzSRlC5X4RdwhwgvEpOoxvr8Lbio4efHQIpLp YGOrRi2xMZ29nid7tAARHbZgt+imoC8WQ0HQNCRXtB2qwZWFeuh++BKrvyyxIHHUI7Rb yMbQ== X-Forwarded-Encrypted: i=1; AJvYcCUun2K9xzQC/QglpvttC2DeMVI5oAQjaFFQZgEu7iQoidN89zhAL/fGc7egmkbu49eFXbq+G2F1Br2NC8w=@vger.kernel.org X-Gm-Message-State: AOJu0Yx7YjMxeJaHqOI9/r05jrmry0ROtFRrdPWhkmqJxHu5OdHCO0J/ 35xl3Xbkm03txL32wdbZxxtUEQHRSQCzWFoF/wElMJnGWsYpn74MMM8JRhCyIF17bPls5O4R3Wb JiD9aIWXMPS9Rah4DchvMBTfNexlcpG2xQS++ZUzhBS63o8T5bbCXLWutYGSctJm1hA== X-Gm-Gg: ATEYQzwR5aplLB5w1mx+63oyM/inJJePwfPJsEJZpj+Q9y235gfIpmzpgHCsQ2KpiG0 9TIMpoaH3EFjxSfPxXQSIQPm9Nmeag6ZCMlvUkkogRIoOynakdcVMDHJ2GLePe6Bos32hrOlZsY 10PTeYYHvHE4p+Dv5AortOsFwGttBEutAQKEOqGWKVP64c3blRSYuSxnzb0CExwZ7cwnnnfgc7x 3HDhZfnVLEXf6ps50H+2Q+Es8t8cd+RXReqcZ1dZkvpl8/4SbCQWXljmfSZK/4oUSdC1x0kXAWh c+/8PHhFfjBGQj69AnJ+mV5/l0fpWOH0mwSBSiqqx6SWTjoLxWW16Lrfi1Yz8QYdfvHn/qCMwhQ ot1br/xFwHQ9Qe4hci85PLwGzULaqlVT/di76kxvngfpY8qzjwUNh7I6U X-Received: by 2002:a05:6214:194d:b0:89c:6bc6:e4fd with SMTP id 6a1803df08f44-89ce8d97094mr180363186d6.19.1774876486885; Mon, 30 Mar 2026 06:14:46 -0700 (PDT) X-Received: by 2002:a05:6214:194d:b0:89c:6bc6:e4fd with SMTP id 6a1803df08f44-89ce8d97094mr180362516d6.19.1774876486400; Mon, 30 Mar 2026 06:14:46 -0700 (PDT) Received: from redhat.com (c-73-183-52-120.hsd1.pa.comcast.net. [73.183.52.120]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89ecf862cdfsm60468816d6.33.2026.03.30.06.14.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 06:14:45 -0700 (PDT) Date: Mon, 30 Mar 2026 09:14:44 -0400 From: Brian Masney To: Rosen Penev Cc: linux-clk@vger.kernel.org, Chanwoo Choi , Krzysztof Kozlowski , Michael Turquette , Stephen Boyd , Kees Cook , "Gustavo A. R. Silva" , "open list:MAXIM PMIC AND MUIC DRIVERS FOR EXYNOS BASED BO..." , "open list:KERNEL HARDENING (not covered by other areas):Keyword:b__counted_by(_le|_be)?b" Subject: Re: [PATCH] clk: clk-max77686: kzalloc + kcalloc to kzalloc Message-ID: References: <20260326052847.335089-1-rosenp@gmail.com> 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: <20260326052847.335089-1-rosenp@gmail.com> User-Agent: Mutt/2.3.0 (2026-01-25) On Wed, Mar 25, 2026 at 10:28:47PM -0700, Rosen Penev wrote: > Simplify allocation by using a flexible array member to combine > allocations. Use struct_size to calculate size properly. > > Use __counted_by to get extra runtime analysis. Assign counting variable > right after allocation as required by __counted_by. > > Signed-off-by: Rosen Penev Reviewed-by: Brian Masney