The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Matthew Brost <matthew.brost@intel.com>
To: Dipendra Khadka <kdipendra88@gmail.com>
Cc: <ltuikov89@gmail.com>, <maarten.lankhorst@linux.intel.com>,
	<mripard@kernel.org>, <tzimmermann@suse.de>, <airlied@gmail.com>,
	<daniel@ffwll.ch>, <dri-devel@lists.freedesktop.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Initialize symbol 'entity' in sched_main.c
Date: Sun, 18 Aug 2024 03:49:20 +0000	[thread overview]
Message-ID: <ZsFvQFnG/LEkzT0V@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <20240817162026.84761-1-kdipendra88@gmail.com>

On Sat, Aug 17, 2024 at 04:20:24PM +0000, Dipendra Khadka wrote:
> smatch reported following error:
> 
> '''
> staging/drivers/gpu/drm/scheduler/sched_main.c:1063 drm_sched_select_entity() error: uninitialized symbol 'entity'.
> '''
> 
> The symbol entity is initialized.
> 

Looks like false postive, no opposed merging it but since
'sched->num_rqs' must be greater than zero it entity should always be
set unless I'm missing something.

Matt

> Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
> ---
>  drivers/gpu/drm/scheduler/sched_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 7e90c9f95611..dcfd4d0f7c6e 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -1047,7 +1047,7 @@ void drm_sched_wakeup(struct drm_gpu_scheduler *sched,
>  static struct drm_sched_entity *
>  drm_sched_select_entity(struct drm_gpu_scheduler *sched)
>  {
> -	struct drm_sched_entity *entity;
> +	struct drm_sched_entity *entity = NULL;
>  	int i;
>  
>  	/* Start with the highest priority.
> -- 
> 2.43.0
> 

      reply	other threads:[~2024-08-18  3:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-17 16:20 [PATCH] Initialize symbol 'entity' in sched_main.c Dipendra Khadka
2024-08-18  3:49 ` Matthew Brost [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=ZsFvQFnG/LEkzT0V@DUT025-TGLU.fm.intel.com \
    --to=matthew.brost@intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kdipendra88@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltuikov89@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox