Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2833252rwb; Mon, 5 Sep 2022 02:09:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR54p6841Ww8hJc38M1BrOAQfHoXXNxlki0r3R8TKZjh3hdpX4xY56mosUJAk+T5ROsytjUc X-Received: by 2002:a17:90b:33c9:b0:1fe:5861:7a0f with SMTP id lk9-20020a17090b33c900b001fe58617a0fmr18195175pjb.187.1662368977179; Mon, 05 Sep 2022 02:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662368977; cv=none; d=google.com; s=arc-20160816; b=Xxvr7tC+hn8hMHr1b/gvjYkB+eJ+Yyi4L2CnSCQGMvn8TtAq/CpMGRN6zyYUJzmanE Bc/r2IHeydCs7av8SEzmSC46U8joFbbg59li1T8oze9o08AWXiOfJhB0HJkeLub3RJjU OmEM8Iq9zpeozmiy0HYBCa8oCtQUeOu82dBb36+419w2HoDM2cVOfYP+3gczSxyNB9Xm ftKU4NuHZV88f7DBaDNYq5nMzzYGjK3Nbz0aJ1whVV/jmghemFr7v5ygaD6+4mXrl4uw cZBHGHwDQO3kHyMcFEQj8tViL9QcOyS2pDcmVLX0xZT5biDDYhvLzpuqH32MVHgmuSSW 4M3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=5JOlfOYlmR2oc5ApM+9EipWPIn67ARiIBBjt5mIOftM=; b=LONVTTTMbl1zme1Hjcj301yIFNRIyIbOXQ0wUCVNU7n+zJoQI4BeVQian/em4Me6Mi N1a32OlCOogzOkmYFLX4EZLPJC5H4s457gW7Gn8mOQKjN0zzcHESuoupXzS0INCdw4hn 5IP2e69R/YD2MZfpa8TFoAumRCrOMBBAHLaTZYj02XHWx3YRwQHemb8IfP70e4ygUhUK z9e9ShaF+ojiclgn3skLNr2ZXletg4sKSkFOSDwpreUsxBlufDhiU2f3eVTuItcGD8ar tmDlaGTGWEqokvdLjvE2eotqJbw8cjLrFke5U2EygDCiOEZ6iImvai/ssgImrT6l+Cn6 7mmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Gh7IPSu1; 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 z7-20020a170902ccc700b001767c1aca52si7133084ple.462.2022.09.05.02.09.26; Mon, 05 Sep 2022 02:09:37 -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=Gh7IPSu1; 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 S237240AbiIEIp7 (ORCPT + 99 others); Mon, 5 Sep 2022 04:45:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237059AbiIEIpz (ORCPT ); Mon, 5 Sep 2022 04:45:55 -0400 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F028E22B0E for ; Mon, 5 Sep 2022 01:45:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662367553; x=1693903553; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=VulwtAMXr7xVKmVAu+tufKJVLzx457Obcg3dQM6GRgQ=; b=Gh7IPSu1bzYmKHZceLJhg50HK1RzVdji2NLCoU2AtBR7rPyB7I7GqjKF 8ppphPr4hi/LXrhzK/fgfQILoqd0eevhMPVHUkTwtkHD3NVZ2HQyaCr+a Oaa2m2dhtZ1jXCPHP2tzgLKsw42ydx1e3jALS/mUDCZOLbT4AamYFyqKo UXu1iEx5DKP+LFTqP8sKAtHx1uAe8g3pjCHZr5PnXvc66To/tX3g1q/Un 18JNmHN1QdRfbHSnTbpvwQXrOhhGvV4/wxs2eawwJyQMozSXgYpvvN0vq fOj1udToE0bh/cKyYAvrKPuIVeaFY2aZFX4rST2g40ISTwMFOft78JPVk A==; X-IronPort-AV: E=McAfee;i="6500,9779,10460"; a="293925801" X-IronPort-AV: E=Sophos;i="5.93,290,1654585200"; d="scan'208";a="293925801" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 01:45:52 -0700 X-IronPort-AV: E=Sophos;i="5.93,290,1654585200"; d="scan'208";a="675198191" Received: from smaciag-mobl2.ger.corp.intel.com (HELO localhost) ([10.252.57.57]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2022 01:45:50 -0700 From: Jani Nikula To: Jingyu Wang , maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@linux.ie, daniel@ffwll.ch Cc: Jingyu Wang , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/print: cleanup coding style in drm_print.h In-Reply-To: <20220904203818.16775-1-jingyuwang_vip@163.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20220904203818.16775-1-jingyuwang_vip@163.com> Date: Mon, 05 Sep 2022 11:45:34 +0300 Message-ID: <87wnaib45t.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,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 Mon, 05 Sep 2022, Jingyu Wang wrote: > Fix everything checkpatch.pl complained about in drm_print.h Sorry, you just can't assume the checkpatch.pl complaints are all correct, or that it would be this trivial to fix them. This is broken. > Signed-off-by: Jingyu Wang > --- > include/drm/drm_print.h | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h > index 22fabdeed297..4332fbeb76a8 100644 > --- a/include/drm/drm_print.h > +++ b/include/drm/drm_print.h > @@ -1,3 +1,4 @@ > +/* SPDX-License-Identifier: MIT */ What's the point of having both the SPDX and full license text in the header? But unless you're the license holder, I'd be pretty careful about removing the license text. > /* > * Copyright (C) 2016 Red Hat > * > @@ -103,7 +104,7 @@ __printf(2, 0) > * @va: the va_list > */ > static inline void > -drm_vprintf(struct drm_printer *p, const char *fmt, va_list *va) > +drm_vprintf(struct drm_printer *p, const char *fmt, va_list * va) Checkpatch is just confused here. Look at all the other params, why would you add an extra space here? > { > struct va_format vaf = { .fmt = fmt, .va = va }; > > @@ -426,16 +427,16 @@ void drm_dev_dbg(const struct device *dev, enum drm_debug_category category, > > > #define drm_info(drm, fmt, ...) \ > - __drm_printk((drm), info,, fmt, ##__VA_ARGS__) > + __drm_printk((drm), info, fmt, ##__VA_ARGS__) > > #define drm_notice(drm, fmt, ...) \ > - __drm_printk((drm), notice,, fmt, ##__VA_ARGS__) > + __drm_printk((drm), notice, fmt, ##__VA_ARGS__) > > #define drm_warn(drm, fmt, ...) \ > - __drm_printk((drm), warn,, fmt, ##__VA_ARGS__) > + __drm_printk((drm), warn, fmt, ##__VA_ARGS__) > > #define drm_err(drm, fmt, ...) \ > - __drm_printk((drm), err,, "*ERROR* " fmt, ##__VA_ARGS__) > + __drm_printk((drm), err, "*ERROR* " fmt, ##__VA_ARGS__) This is macro magic, and that ,, there passes an empty arg. You remove it completely, shifting all the args to the wrong place, breaking drm error logging. BR, Jani. > > > #define drm_info_once(drm, fmt, ...) \ > > base-commit: e47eb90a0a9ae20b82635b9b99a8d0979b757ad8 > prerequisite-patch-id: f039528bc88876d6e0f64e843da089e85f6d3f58 > prerequisite-patch-id: c14ed2e970be2c3f8ba746634e8161b94c148e88 -- Jani Nikula, Intel Open Source Graphics Center