linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dexuan Cui <decui@microsoft.com>
To: Saurabh Sengar <ssengar@linux.microsoft.com>,
	Saurabh Singh Sengar <ssengar@microsoft.com>,
	"drawat.floss@gmail.com" <drawat.floss@gmail.com>,
	"airlied@linux.ie" <airlied@linux.ie>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Michael Kelley (LINUX)" <mikelley@microsoft.com>
Subject: RE: [PATCH v3] drm/hyperv: Added error message for fb size greater than allocated
Date: Mon, 11 Apr 2022 06:40:38 +0000	[thread overview]
Message-ID: <BYAPR21MB1270B3CFBE674EB0A7537180BFEA9@BYAPR21MB1270.namprd21.prod.outlook.com> (raw)
In-Reply-To: <1649650437-17977-1-git-send-email-ssengar@linux.microsoft.com>

> Subject: [PATCH v3] drm/hyperv: Added error message for fb size greater than
> allocated
> 
> Added error message when the size of requested framebuffer is more than
> the allocated size by vmbus mmio region for framebuffer

"Added" --> "Add"? My impression is that we don't use past tense in the 
Subject and the commit message. See
"git log drivers/gpu/drm/hyperv/hyperv_drm_modeset.c".
 
> --- a/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> +++ b/drivers/gpu/drm/hyperv/hyperv_drm_modeset.c
> @@ -123,8 +123,11 @@ static int hyperv_pipe_check(struct
> drm_simple_display_pipe *pipe,
>  	if (fb->format->format != DRM_FORMAT_XRGB8888)
>  		return -EINVAL;
> 
> -	if (fb->pitches[0] * fb->height > hv->fb_size)
> +	if (fb->pitches[0] * fb->height > hv->fb_size) {
> +		drm_err(&hv->dev, "hv->hdev, fb size requested by process %s
> for %d X %d (pitch %d) is greater than allocated size %ld\n",
Should we use drm_err_ratelimited() instead of drm_err()?

The line exceeds 80 chars.

> +		current->comm, fb->width, fb->height, fb->pitches[0], hv->fb_size);
>  		return -EINVAL;
> +	}

Maybe we can use the below:
	drm_err_ratelimited(&hv->dev, "%s: requested %dX%d (pitch %d) "
                     "exceeds fb_size %ld\n",
                     current->comm, fb->width, fb->height,
                     fb->pitches[0], hv->fb_size);

Note: the first chars of last 3 lines should align with the "&" in the
same column. Please run "scripts/checkpatch.pl" against the patch.

  reply	other threads:[~2022-04-11  6:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  4:13 [PATCH v3] drm/hyperv: Added error message for fb size greater than allocated Saurabh Sengar
2022-04-11  6:40 ` Dexuan Cui [this message]
2022-04-11  7:55   ` Saurabh Singh Sengar
2022-04-11 19:02     ` Dexuan Cui
2022-04-12  4:07       ` Saurabh Singh Sengar

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=BYAPR21MB1270B3CFBE674EB0A7537180BFEA9@BYAPR21MB1270.namprd21.prod.outlook.com \
    --to=decui@microsoft.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=drawat.floss@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikelley@microsoft.com \
    --cc=ssengar@linux.microsoft.com \
    --cc=ssengar@microsoft.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).