Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2677588iof; Wed, 8 Jun 2022 09:43:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyI+iN/z4nPbHPHvvjKfqA1jv74ap97in/eRYxnkUg6QlXLCtzPO8rJwTjTlvDXy64VQm/i X-Received: by 2002:a17:902:ce87:b0:163:fc5e:398b with SMTP id f7-20020a170902ce8700b00163fc5e398bmr34390321plg.125.1654706603639; Wed, 08 Jun 2022 09:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654706603; cv=none; d=google.com; s=arc-20160816; b=m/FSDKwRI+jXnQO/Zao+RDft1jduNdyek5kB4kwpMihfgEA0q2gJnOFeJBuccwttgc PNMZdELIcpvzCC1rx7NHr2u4C2Cxa10VmbT05MCGf+9GTgY1Ia5tK4RPOsLJhkI17L1w VtYUpaVi3Qcu0iQL0hE8XtsHURpEkCXpwuVnyXi9lEQ2pg8vSPo0k6D41t3T5GNPhsj2 JScH68fQLglyjHnH4ZlWPCYR8FnfIfPUHyC+uHwep0w17k9LPGQAU5P8h5srhzXG4f6q lfoc2NBqHQR+cjJ7INX+sFbDAT2k3IEBYmTfn5+Mq+YMG/boUVI0has3vGtnpPos6YwX +yCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Xj7h12UkZIB4SsfQQ+SZ6RUvCHFdGip3OqzBInEc28s=; b=WKyRr7FXt3HcMz2r9OCm4dzodrQSbvf7imkOhlManyH+pG8lOUY+ws45rooOyaF1WU 8WK3kMefNajVV6/TDBr+yZRi1QnEPPToV3VHPjc4KgG6WVAf2WGdEyPP6mjHNUrR4X++ 7QrazcFVfmXocKxPJGGEC/JNNU2lDxFbtzoaSKmPbqtEdQD5iMyO8/H+czLBMKhkJUCH MKAsNZhfFbXOxR3vZ7/LPnrA+kfJjPEquriLqwE8zqjHf0i/LAP+p3nxD/BMJRkVmu8g SwWElOJi9LM48E7DendbuPXQw6+TejnnJ9gWgKS++EdVLvQZd1jxotIOweHmruQ4Vzew +ZfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=su+DB+FE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r72-20020a632b4b000000b003fd08533f47si23876840pgr.548.2022.06.08.09.43.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 09:43:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=su+DB+FE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C6D174615C; Wed, 8 Jun 2022 09:16:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245271AbiFHQQM (ORCPT + 99 others); Wed, 8 Jun 2022 12:16:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245255AbiFHQQK (ORCPT ); Wed, 8 Jun 2022 12:16:10 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5305A4B1D0 for ; Wed, 8 Jun 2022 09:16:09 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id b8so11098725edj.11 for ; Wed, 08 Jun 2022 09:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Xj7h12UkZIB4SsfQQ+SZ6RUvCHFdGip3OqzBInEc28s=; b=su+DB+FEUDTr+F2VLRr+X1PXTruzq0D1wec0lhVPqBRoWsnVJ9fAC9K7QDoZ1RsTl8 dUSLW1/g7MHRHilP/lspdCnDtksPo0tN1Fat08Wc316vzYXA86SZoccWJQdTQ3f6NMiA Y2LeATMewXgJug1Ocn77JxKWxbfpF7/YZ9H493mLQ4QfmsiwoIY0MdH+uZMGMvzP0mP2 LoUfaJXAtvpvAJxc6/JAeGKRFoTBKCdXDomwtSVTeQZFlgy86+kCPORnI3SDSWVzR5o2 rWGbgR5roMExQuHmTQqdwePDcM9aU8bS5nvi4G/mBPGP7DRcK4qQzWxTwQz9L8WJ0lxG I3bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Xj7h12UkZIB4SsfQQ+SZ6RUvCHFdGip3OqzBInEc28s=; b=4AGxawcXV93NDI6EION7OMx8rDRIYz1LzSjRn874+6n4XQ76iL3N24U40iGrPvmPHE AmgI6jaG4pro/LZgNqTpHzwIH+SvHbj1VhVJGR2yl9u+Mrt18RHKQQ7kkhf9zcVdvoBC fvmSthydmO9IkKGwGN5ddQ4jui59GH9fnnxcnuz4uEtrxsXhjZZ9+kazzSeeVFEzojub SdmkgtBVjFAgmn6vaGGSyhLcwzd3iyGmiEEdMgqG6lX4C2sbPeAFVcRNLPfuveYxmaN7 4+lFrWBOVjeqsHG2m5DX0YSpnjpV2QMSIEbOKEZeYnA7EbfXFDdRTwjIOAiOUrfzsRa2 uytw== X-Gm-Message-State: AOAM533mGgeWVizVqIAniXURWOMVFLiZx/6c4iVKnIl2U78+fRWOMFqA lgNHCfCfEaNkC/E2pKMV/buNNEoz4Xj+0bLXXqHzNQ== X-Received: by 2002:aa7:c84d:0:b0:431:4226:70c9 with SMTP id g13-20020aa7c84d000000b00431422670c9mr23414709edt.51.1654704967667; Wed, 08 Jun 2022 09:16:07 -0700 (PDT) MIME-Version: 1.0 References: <20220608110734.2928245-1-tzungbi@kernel.org> <20220608110734.2928245-14-tzungbi@kernel.org> In-Reply-To: <20220608110734.2928245-14-tzungbi@kernel.org> From: Guenter Roeck Date: Wed, 8 Jun 2022 09:15:56 -0700 Message-ID: Subject: Re: [PATCH v3 13/23] platform/chrome: cros_ec: don't allocate `din` and `dout` in cros_ec_register() To: Tzung-Bi Shih Cc: Benson Leung , Guenter Roeck , "open list:CHROME HARDWARE PLATFORM SUPPORT" , linux-kernel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL 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 Wed, Jun 8, 2022 at 4:08 AM Tzung-Bi Shih wrote: > > Don't allocate `din` and `dout` in cros_ec_register() as they will be > allocated soon in cros_ec_query_all(). > > Signed-off-by: Tzung-Bi Shih Reviewed-by: Guenter Roeck > --- > No change from v2. > > drivers/platform/chrome/cros_ec.c | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c > index e51a3f2176c7..29d3b544dafb 100644 > --- a/drivers/platform/chrome/cros_ec.c > +++ b/drivers/platform/chrome/cros_ec.c > @@ -188,14 +188,8 @@ int cros_ec_register(struct cros_ec_device *ec_dev) > ec_dev->max_passthru = 0; > ec_dev->ec = NULL; > ec_dev->pd = NULL; > - > - ec_dev->din = devm_kzalloc(dev, ec_dev->din_size, GFP_KERNEL); > - if (!ec_dev->din) > - return -ENOMEM; > - > - ec_dev->dout = devm_kzalloc(dev, ec_dev->dout_size, GFP_KERNEL); > - if (!ec_dev->dout) > - return -ENOMEM; > + ec_dev->din = NULL; > + ec_dev->dout = NULL; > > mutex_init(&ec_dev->lock); > > -- > 2.36.1.255.ge46751e96f-goog >