Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2023335pxb; Fri, 29 Jan 2021 10:55:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwEAs1j/BmgUbBl7BHDato0cWZofuzPEuB1n0hvXr+dl9Mc/lR1LUKShHagoxYjfZ61rUX8 X-Received: by 2002:a05:6402:1b11:: with SMTP id by17mr6647264edb.373.1611946553715; Fri, 29 Jan 2021 10:55:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611946553; cv=none; d=google.com; s=arc-20160816; b=kZkzUq9ezX/sC4jBv8S2uEC4EH2Lqt/lGDcH4BAzRzXgkAkRPFRGznyDj0tbHllu15 7AgfzuP6Jc2RWfQc9GADxhoYs5sZkZHrmuPAAnfpNh5G8mBls6lAm9HyN240YIhSnSwz bESZh15DyBUJftQ9LUf8pdULpHIpRS/cByn/TLLsMRGq17esiAio/jYw1cgEgHmhL8Th WqsBzK9X/FNQQ0+ZnSRiCZToBELnriz9EazNRRPgh0ZNo5b1TbV8gIuf/GMwtsROwTu4 6k7VSAOzBOZPl7i0J1usarGoC0p4CFvmnzBuOjegx4YMI7YK7o8LrPNaUoTcVMaeO31P Wa8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=CKYPGpw6lCqeowfiv7rFUsVj4OV9hEgPQyhycAolNis=; b=bWrbuIZCOBcYaEdkaKrdJtKMc6XkXO/c/AbiBGUkv8X8ZF09Ah78BX2y9FwIi4qWTu 6sfoWIYV4Gd1CY5C6h2SkF/xNTYKSvQ1yEOtFqgwlotEw5H88rv/5ufrTxpqVI6SEfdc I2ox/xJCiZ9tp8CJvPkrPvlVahLbd0ndlxZEOXk0FvH8oVokMZkJh3pJt6pl83SJ9IgM kkUkyuPulvmdAKF/by1zmuAq+BTOJfEFodpa9wHjeDCTR9qDBNcq6PuWuEj1UF53D6kE wvsmeVyhjo1wHqo5WTBQIL5wybwJRySPcrbCnOJDbiAYTTmY06p7iVtnOut3eCL1UOvq PJJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qp24si6174367ejb.563.2021.01.29.10.55.29; Fri, 29 Jan 2021 10:55:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232600AbhA2Swu (ORCPT + 99 others); Fri, 29 Jan 2021 13:52:50 -0500 Received: from mga06.intel.com ([134.134.136.31]:5577 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232208AbhA2Sws (ORCPT ); Fri, 29 Jan 2021 13:52:48 -0500 IronPort-SDR: 0hOXklQmb3zYtTBIAvTmNYQXROyy2whAKcAvjWXa+IxvuIC3mowFnAdJWTuULNPivDrLRbUTuv 6LCzgmHVjIQg== X-IronPort-AV: E=McAfee;i="6000,8403,9879"; a="241987896" X-IronPort-AV: E=Sophos;i="5.79,386,1602572400"; d="scan'208";a="241987896" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 10:50:57 -0800 IronPort-SDR: 1MknLL+aUY6DrFLl+47vBo+oyivvyjNpwQVYau+01mQ+INVKlm0ClsbDNshtXIZ8esmF1fw06j xGcoQyj5fM0w== X-IronPort-AV: E=Sophos;i="5.79,386,1602572400"; d="scan'208";a="431125277" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jan 2021 10:50:55 -0800 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1l5Yr6-000S8i-Os; Fri, 29 Jan 2021 20:50:52 +0200 Date: Fri, 29 Jan 2021 20:50:52 +0200 From: Andy Shevchenko To: mail@richard-neumann.de Cc: syniurge@gmail.com, nehal-bakulchandra.shah@amd.com, shyam-sundar.s-k@amd.com, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 1/2] Removed NIH log functions Message-ID: References: <20210129182606.41518-1-mail@richard-neumann.de> <20210129182606.41518-2-mail@richard-neumann.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210129182606.41518-2-mail@richard-neumann.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 29, 2021 at 07:26:05PM +0100, mail@richard-neumann.de wrote: > From: Richard Neumann Thanks for the patch, my comments below. > Removed unnecessary ndev_pdev, ndev_name and ndev_dev macros. > Using pci_{info,warn,err,dbg} functions of the kernel's PCI API. First of all Subject should be in imperative mode with corresponding prefix, something like: "i2c: amd-mp2: Remove NIH logging functions". Same to the rest of the series. While at it, drop useless __func__ parameters. ... > - dev_dbg(ndev_dev(privdata), "%s id: %d\n", __func__, > + pci_dbg(privdata->pci_dev, "%s id: %d\n", __func__, > i2c_common->bus_id); E.g. this will become one line after dropping __func__. ... Also in some cases, like here, you may consider simple trick to reduce amount of LOCs. struct pci_dev *pdev = privdata->pci_dev; > if (res != command_failed) > - dev_err(ndev_dev(privdata), "invalid response to i2c command!\n"); > + pci_err(privdata->pci_dev, > + "invalid response to i2c command!\n"); pci_err(pdev, "invalid response to i2c command!\n"); > return; -- With Best Regards, Andy Shevchenko