Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2981148rwb; Sat, 29 Jul 2023 20:06:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlHjuDzAH0/vkqpt4kxoBAHkbpCSZjdHHhtNVvXaJFJt0weU3TdmqK6sE9vCfZDe6zpimOxu X-Received: by 2002:a17:90b:17c2:b0:267:8012:b39d with SMTP id me2-20020a17090b17c200b002678012b39dmr5884795pjb.29.1690686410512; Sat, 29 Jul 2023 20:06:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690686410; cv=none; d=google.com; s=arc-20160816; b=i37C1nvMMd0610FUa8yBibZef7BTak/EmZAaNgkTwIqwcXQT31vIG4IMTiMvT+q1lQ bnHOLXAjxMXvNFavPjLTPgwOsHRHCRsinJlAtlm3GCOkRPBv2zst91ryeZECfifCsriz PT5L8tXkEkn5dPxb3LhN0v/Ntpli2eM+mp148dfiyX2t87rX+aDIOgAPBtV6ioIagjbg zK0U1AeCEfbFbMeFVvRvgV3gxmVuSp3fJw3eFR7gJfqR4tWkRDpjXUgebyx+aqq7oSLg o5W+go3LTTVsvgeciCn+lnNB1H0yxjFybFZZ3RtPFcnLguTZfMWpq070QZ6YLBWP/LgW hfiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zPGvZOVm9vAfjFL7xvOJ2NuBaMWP99QeKYnt7FDDhjE=; fh=jUXbiA7VnbSZM7mBx03id3DGvZgMWCr4XoRuJVrwyNg=; b=BDO1YqLqggMyRh9tmmpXrMyaN/DCDkhamK35p0rDV3qxs+i3StYEOZqIkBMFtr+kn5 uEnHkzj56bUiS3MjNFlND5mWrMD/ETmLgS2VhtR2bkd2d7VTdJWNp+iPg3gjfFJnQDiR eGGefukC2EFEBPws3knMT2EQzTIXJPNd+IcZ80eRsDr+QbSt9yHRguH483GB7Oco7AHm +Zyiaoo9BW3RBPMUiibM+MXoAKOi9vif8UtZl0bxA+eHITvOLtXwRt6N2E7BbvLFsJ7m 0WJfdhrU9jRyZXubgsCHtvfm/bHkItsLtd5IC9+Gm14wp0mRZr3BS6LmueJiGe5iUFf7 aD6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cIn2TF5Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n17-20020a170902d2d100b001b8c824e826si3813685plc.533.2023.07.29.20.06.38; Sat, 29 Jul 2023 20:06:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cIn2TF5Y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229597AbjG3CRv (ORCPT + 99 others); Sat, 29 Jul 2023 22:17:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjG3CRt (ORCPT ); Sat, 29 Jul 2023 22:17:49 -0400 Received: from mgamail.intel.com (unknown [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 885B826BF; Sat, 29 Jul 2023 19:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690683468; x=1722219468; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4wDGaGKo6PLfCUabc1B5tsUUYI3cEeGdCdYqo2+gK4U=; b=cIn2TF5Ylu98/Dd1/v7GvIrh3kCuEum/ZzFLnY87uM+n/VkYXmzDZ4sx 1WTXtEpDHCZXxN3f9+lnUpkWOogdYqPZCCbCmyw8OyKKu70ryjzNb/vXF rTDAeiQKfGCO2H0zIYIQGy8vWF8inm9zlHdEwA4GRNHge3YD/tJP6N19h D4mcW+eW12NR6UdOTJybR25sBPCKSmbX8euy9GHsU8CZyia0WjEKlHzrR vKk2NuYmdwIq0buvbUIvoDpJYGwldhaLhrLShKT4/BwwtLVBpKfXyKtPx +CQcOlSvEyr2ORnYMKnqsEdhZOeTbVN9nQ5sELo460cQyDhscxR6AqfJd g==; X-IronPort-AV: E=McAfee;i="6600,9927,10786"; a="371506912" X-IronPort-AV: E=Sophos;i="6.01,240,1684825200"; d="scan'208";a="371506912" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2023 19:17:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.01,202,1684825200"; d="scan'208";a="871227345" Received: from aschofie-mobl2.amr.corp.intel.com (HELO aschofie-mobl2) ([10.212.203.2]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2023 19:17:43 -0700 Date: Sat, 29 Jul 2023 19:17:40 -0700 From: Alison Schofield To: Raghu Halharvi Cc: linux-cxl@vger.kernel.org, ira.weiny@intel.com, bwidawsk@kernel.org, dan.j.williams@intel.com, vishal.l.verma@intel.com, linux-kernel@vger.kernel.org, Dave Jiang Subject: Re: [PATCH v7 1/2] cxl/mbox: Remove redundant dev_err() after failed mem alloc Message-ID: References: <20230726073421.2452-1-raghuhack78@gmail.com> <20230726073421.2452-2-raghuhack78@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230726073421.2452-2-raghuhack78@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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, Jul 26, 2023 at 07:34:20AM +0000, Raghu Halharvi wrote: > Issue found with checkpatch > > A return of errno should be good enough if the memory allocation fails, > the error message here is redundant as per the coding style, removing > it. > > Signed-off-by: Raghu Halharvi > Reviewed-by: Vishal Verma > Reviewed-by: Dave Jiang > Reviewed-by: Ira Weiny Thanks for follow-up Raghu! Reviewed-by: Alison Schofield > --- > drivers/cxl/core/mbox.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c > index d6d067fbee97..af7f37cea871 100644 > --- a/drivers/cxl/core/mbox.c > +++ b/drivers/cxl/core/mbox.c > @@ -1325,10 +1325,8 @@ struct cxl_memdev_state *cxl_memdev_state_create(struct device *dev) > struct cxl_memdev_state *mds; > > mds = devm_kzalloc(dev, sizeof(*mds), GFP_KERNEL); > - if (!mds) { > - dev_err(dev, "No memory available\n"); > + if (!mds) > return ERR_PTR(-ENOMEM); > - } > > mutex_init(&mds->mbox_mutex); > mutex_init(&mds->event.log_lock); > -- > 2.39.2 >