Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5575394rwr; Mon, 1 May 2023 07:53:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6nLFwlQT1vkHdMz1LO+5H1JmAWqH2Mp+L21qkEiVGiuqpyBGJVSFyjV1fuEbtaVtDTtYs1 X-Received: by 2002:a05:6a20:c1a4:b0:eb:b8:bdc8 with SMTP id bg36-20020a056a20c1a400b000eb00b8bdc8mr15040017pzb.57.1682952829949; Mon, 01 May 2023 07:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682952829; cv=none; d=google.com; s=arc-20160816; b=mEe03keWv3hA3XHHpNYAvJoDxn4E59ePnQ52iiGA+CyUYIZdskLsyJszGpRhqh0wdf y7ruk+h5hJxKbB3AVAgygAKZTXoKcqw1LC1Nv+gTx0ij4ABdr2yqMk9Te9VTMJNuxI+K 3clrEzaYn51BLz0Eyvru4a5SXaQaS+B0d0JdYKXQg/mrHb8aa434hbJLbB9XD4ZDzIKf ukPNXtE7bG1oYFlqU/J1Gxvs8EzU2VuP6Oxpjee0U7cuhX9U0qY3EUh+qxj2kIyV8Ovd xa92VlCWAmk/gP7f1oOrbzyXcBzTb0RzeDMA1FQ0rnISqwWcOW7n7HauNPIwU5TZ5Nli 6qGg== 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=b5yiwMwoMdURt0FYkk2zDQHe6abY5SRkRVAacbQ+1w4=; b=ItSc9h4Kko6yUosNDfGPeq1Dn0n3A/KaxMFcTmhF1mj5RwOTcbGkFGN2GXW55nc75Q tE+3wEqlwtLoGZNoaIpjoPVNRaElcoryCu2zLXO6uEXQOIltq2V2IfhSmxNJDgIw4UVs q1KE8HEmSH/00bKhhsLcSVS/utTI3Tns5DeNXcQB0hluszDfCT2UiDxZXIDfUw6H6YX5 /HiaLY2XAAOU4ZJDVpY6Y6MuWuanlnOVSQhP+qYMLcMxB2iPN3aBOyTKAqkX3ErSoulg x5JJEc+y0BWjEd4hGzWU0oTBgNkmS+5msb78B+d+hTu7QyW47WBYijU27V/7fZd2UNJ6 CRhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Pegpo2Hv; 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 bv130-20020a632e88000000b00519cded0624si28447872pgb.899.2023.05.01.07.53.37; Mon, 01 May 2023 07:53:49 -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=Pegpo2Hv; 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 S232398AbjEAOwV (ORCPT + 99 others); Mon, 1 May 2023 10:52:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232331AbjEAOwT (ORCPT ); Mon, 1 May 2023 10:52:19 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0BFBE54; Mon, 1 May 2023 07:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1682952738; x=1714488738; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=w1kVWQtJXHcWHK2KlJ0nuiROkNtp7Mo5xqYnEd0zssQ=; b=Pegpo2HvZ81b/6ODqsgO1xV4BvYW59mgmAYViIrgyZ0zAvCLjCH91Rxq zudwJ93k6WDm4fxXKrjsd7ovXlVt2QjTj5mzCWfmZT5Amb/NsnJd7yWDa 4e+btSzoHq+7W0OWA07ffhsLghigYZs3eSj/ay65AYxpxRuRczzyVezI6 144/jBgy0M2YYG28ZoNsxxGDMiU3/q8HM+kRlFTvZhPzm/MMDQzyS6H2m u8Y2WEYLz0vhZsInaRB8ylKzIr7Zis+mwkJL8ObohZx52zkCZilhSxHtt m7KiU8zljzDhKj3XlHXDEWU69FpBZ5EBlPg/T7LpYQlclyVV71aXJblsc w==; X-IronPort-AV: E=McAfee;i="6600,9927,10697"; a="434474055" X-IronPort-AV: E=Sophos;i="5.99,241,1677571200"; d="scan'208";a="434474055" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2023 07:52:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10697"; a="765326926" X-IronPort-AV: E=Sophos;i="5.99,241,1677571200"; d="scan'208";a="765326926" Received: from djiang5-mobl3.amr.corp.intel.com (HELO [10.212.85.208]) ([10.212.85.208]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 May 2023 07:52:17 -0700 Message-ID: <0d232ddc-446c-bfca-71f4-51182356e974@intel.com> Date: Mon, 1 May 2023 07:52:17 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.10.0 Subject: Re: [PATCH v2 1/2] cxl/mbox: Remove redundant dev_err() after failed mem alloc Content-Language: en-US To: Raghu H , linux-cxl@vger.kernel.org, Alison Schofield , ira.weiny@intel.com, bwidawsk@kernel.org, dan.j.williams@intel.com, vishal.l.verma@intel.com Cc: linux-kernel@vger.kernel.org References: <20230428012235.119333-1-raghuhack78@gmail.com> <20230428012235.119333-2-raghuhack78@gmail.com> From: Dave Jiang In-Reply-To: <20230428012235.119333-2-raghuhack78@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 4/27/23 6:22 PM, Raghu H wrote: > Issue found with checkpatch > > A return of errno should be good enough if the memory allocation fails, > the error message here is redundatant as per the coding style, removing it. > > Signed-off-by: Raghu H Reviewed-by: Dave Jiang > --- > 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 f2addb457172..11ea145b4b1f 100644 > --- a/drivers/cxl/core/mbox.c > +++ b/drivers/cxl/core/mbox.c > @@ -1112,10 +1112,8 @@ struct cxl_dev_state *cxl_dev_state_create(struct device *dev) > struct cxl_dev_state *cxlds; > > cxlds = devm_kzalloc(dev, sizeof(*cxlds), GFP_KERNEL); > - if (!cxlds) { > - dev_err(dev, "No memory available\n"); > + if (!cxlds) > return ERR_PTR(-ENOMEM); > - } > > mutex_init(&cxlds->mbox_mutex); > mutex_init(&cxlds->event.log_lock);