Received: by 2002:ac2:48a3:0:0:0:0:0 with SMTP id u3csp552040lfg; Fri, 11 Mar 2022 13:02:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyrbAjVx+okFu1hTN7ZjW1Gjpn6yv2arx9gKbChfMoe2OXgtK8RQmwOCupZ2LswMNEpbUKs X-Received: by 2002:a17:90a:67c3:b0:1bc:9cdf:1ee9 with SMTP id g3-20020a17090a67c300b001bc9cdf1ee9mr12670871pjm.203.1647032523199; Fri, 11 Mar 2022 13:02:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647032523; cv=none; d=google.com; s=arc-20160816; b=cCBYRCozpnX3ZNQZMnqgu2aZ9VQhvozDzH9kKcvEgTSG+D3qvk3UH9ZPu4n0hF0Gc5 nTIIOXYvNCtxCbc30CfkIVhSxa8cGErhaSvD8yv8uTGD1G8WXJc6jfzYGwyqJLI8fd2M +abE8kIm3bRYB2YDsKq7SOdM11+wpJie4fmAJXfXA9LTieqMtmeg6NeKmglCmaClvx9f uixTImuE/ZjP4+CGQqYMBHO7InOeQhreEqIE4PDrZJD+qONgt/Aog2EhwmLSURfxyvsZ w/qYdh5gO5+a3mZoaojg1vKd3VVIcXjRHnSskpeQ250vTg6kNqjxMj1MsNeHppj1Yc3n YwQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=GjFRD/9lEJoDZd2iHKsangrWSMTO+5I2agn/qVuV8qs=; b=qrAIxmtSrVYquZL4ieaX0NQd0zJfJ0XMyxX6OVgOLKMgfZ2CVCTeNHyAiNtYHzh/YL NGHRsFpZ7hCzDabJX2O1NiTAlCAF4YXlW9EpeuClr5CIpCBDCmYqHM9/vQhwvCBcn6YX H9SniMIQjqyMobY0B7Mlt1g5e84c3IAcsLWvixUrI8IX6bXvWcc9/GYQwLy+qT0qWxHJ OxSgY9eVtJWF4p/qsFMXgImSCC1P4uMTxS5tonxmr/0WYKMqJBeQd0y/2ZHOWnepQWmu g/Y6VIdD7608R8lTVJsbT9Bl6CWnAm0ee5ErJzsgaVI3hmcwv1VDAsyaO1SUQZO6HpoF lSXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mFwvW4rX; 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=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a187-20020a6390c4000000b0037c9aff1097si8726640pge.729.2022.03.11.13.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 13:02:03 -0800 (PST) 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=@linaro.org header.s=google header.b=mFwvW4rX; 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=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AC5CBE0AC9; Fri, 11 Mar 2022 12:48:20 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348745AbiCKNEC (ORCPT + 99 others); Fri, 11 Mar 2022 08:04:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348736AbiCKND7 (ORCPT ); Fri, 11 Mar 2022 08:03:59 -0500 Received: from mail-il1-x12a.google.com (mail-il1-x12a.google.com [IPv6:2607:f8b0:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE6892E089 for ; Fri, 11 Mar 2022 05:02:53 -0800 (PST) Received: by mail-il1-x12a.google.com with SMTP id l13so5870960iln.13 for ; Fri, 11 Mar 2022 05:02:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=GjFRD/9lEJoDZd2iHKsangrWSMTO+5I2agn/qVuV8qs=; b=mFwvW4rXhHFY/F7Hmapw3Rafdjg4wgiZVsST1HQiQHcQcDPio3iFZMTOVmwYR3+Vwp 2+mCtb+tkPhSmYWZtrYicfUyy9ZByxewSj5V6NgpjwcAYfjKAWOwCgXJodJq3ra4vYyx S9LjsdPZ0RYrYFNFFZHh0xB2p38eSgzvv+PvWmyks5dMAmBHjTnG61TgtQ1D4AWKk0xb 9YibeoiGSu5KPoTGcmIC2MP+aw9+UakeJ3Pe2uWfMS3ZTnCGp4GS1jpmpFxsen1vGw7l +XH2VbHgTkYcbkXAgQ1ni7Q8VI47/JiaHwO8SKCq4BAnZUg86stjL4918vAbkdET2UFU oOLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=GjFRD/9lEJoDZd2iHKsangrWSMTO+5I2agn/qVuV8qs=; b=diLWJaNHqtmx6E0OdUKsP17i6sXratr19iuNgBjTtvSXq1NaRT8ykNeZnsZXfYOkjW 48YSlnpe9QveTMA5Gsk7K0hrz6o/6ttfX6L8sxtLr58jBg1Q20X0T6pMpniyfaxad/gJ fq/51FYDvRKvjAc70g1Scc7iAcWNOGTvKGOnHsjxpl1FAIQAs7PdKOTXHMLrQbQanypd 0U/Mbc39OYR0JArwhWrBKYfdN7jhID4VSb9LjFH8ERkYqEXDio12L8x8xvD6ElRPBP6Q i0hLmvhH838ebFVqmO+lllfy+UUNpKMpX1RbzixbzJpKVERPGTQmyAB6f3VxdrofNH40 dTwA== X-Gm-Message-State: AOAM533oYBcBuZLuQeC9LRDKtuRuQAxtB25LOFEF9MZv2YLY306XNGn5 5R8o9i5jUp6iok0FB/A4VKE6tw== X-Received: by 2002:a05:6e02:1baf:b0:2c2:46eb:a074 with SMTP id n15-20020a056e021baf00b002c246eba074mr7234018ili.263.1647003773245; Fri, 11 Mar 2022 05:02:53 -0800 (PST) Received: from [172.22.22.26] (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.googlemail.com with ESMTPSA id l14-20020a056e0205ce00b002c782f5e905sm81979ils.74.2022.03.11.05.02.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Mar 2022 05:02:52 -0800 (PST) Message-ID: <680f7662-7a7d-4e26-6fdf-e4d961895dcd@linaro.org> Date: Fri, 11 Mar 2022 07:02:50 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH net-next v2 6/7] net: ipa: embed interconnect array in the power structure Content-Language: en-US To: Jakub Kicinski Cc: davem@davemloft.net, djakov@kernel.org, bjorn.andersson@linaro.org, mka@chromium.org, evgreen@chromium.org, cpratapa@codeaurora.org, avuyyuru@codeaurora.org, jponduru@codeaurora.org, subashab@codeaurora.org, elder@kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220309192037.667879-1-elder@linaro.org> <20220309192037.667879-7-elder@linaro.org> <20220310212523.633287d4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Alex Elder In-Reply-To: <20220310212523.633287d4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 On 3/10/22 11:25 PM, Jakub Kicinski wrote: > On Wed, 9 Mar 2022 13:20:36 -0600 Alex Elder wrote: >> - power = kzalloc(sizeof(*power), GFP_KERNEL); >> + size = data->interconnect_count * sizeof(power->interconnect[0]); >> + power = kzalloc(sizeof(*power) + size, GFP_KERNEL); > > struct_size(), can be a follow up I can do that today; I'll look for other instances in the driver where this could be done as well. Thanks. -Alex