All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: chenxuebing <chenxb_99091@126.com>,
	airlied@gmail.com, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, daniel@ffwll.ch, tzimmermann@suse.de
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	chenxuebing <chenxb_99091@126.com>
Subject: Re: [PATCH] drm: Clean up errors in drm_dp_mst_topology.h
Date: Thu, 11 Jan 2024 11:59:21 +0200	[thread overview]
Message-ID: <875y00ur5y.fsf@intel.com> (raw)
In-Reply-To: <20240111064245.8789-1-chenxb_99091@126.com>

On Thu, 11 Jan 2024, chenxuebing <chenxb_99091@126.com> wrote:
> Fix the following errors reported by checkpatch:
>
> ERROR: space prohibited before open square bracket '['

Same here, checkpatch just isn't clever enough to realize it's within a
macro.

BR,
Jani.

>
> Signed-off-by: chenxuebing <chenxb_99091@126.com>
> ---
>  drivers/gpu/drm/display/drm_dp_mst_topology.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> index bd6c24d4213c..a4a24ec11b80 100644
> --- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
> +++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
> @@ -100,7 +100,7 @@ static bool drm_dp_mst_port_downstream_of_branch(struct drm_dp_mst_port *port,
>  
>  #define DBG_PREFIX "[dp_mst]"
>  
> -#define DP_STR(x) [DP_ ## x] = #x
> +#define DP_STR(x)[DP_ ## x] = #x
>  
>  static const char *drm_dp_mst_req_type_str(u8 req_type)
>  {
> @@ -131,7 +131,7 @@ static const char *drm_dp_mst_req_type_str(u8 req_type)
>  }
>  
>  #undef DP_STR
> -#define DP_STR(x) [DP_NAK_ ## x] = #x
> +#define DP_STR(x)[DP_NAK_ ## x] = #x
>  
>  static const char *drm_dp_mst_nak_reason_str(u8 nak_reason)
>  {
> @@ -156,7 +156,7 @@ static const char *drm_dp_mst_nak_reason_str(u8 nak_reason)
>  }
>  
>  #undef DP_STR
> -#define DP_STR(x) [DRM_DP_SIDEBAND_TX_ ## x] = #x
> +#define DP_STR(x)[DRM_DP_SIDEBAND_TX_ ## x] = #x
>  
>  static const char *drm_dp_mst_sideband_tx_state_str(int state)
>  {

-- 
Jani Nikula, Intel

      reply	other threads:[~2024-01-11  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-11  6:42 [PATCH] drm: Clean up errors in drm_dp_mst_topology.h chenxuebing
2024-01-11  6:42 ` chenxuebing
2024-01-11  9:59 ` Jani Nikula [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875y00ur5y.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=chenxb_99091@126.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.