All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: kbuild-all@lists.01.org
Subject: Re: [linux-next:master 8015/8469] drivers/gpu/drm/i915/i915_mm.c:76 remap_io_sg() error: uninitialized symbol 'err'.
Date: Thu, 01 Apr 2021 09:55:02 +0200	[thread overview]
Message-ID: <20210401075502.GA28983@lst.de> (raw)
In-Reply-To: <20210330100152.GC2065@kadam>

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

On Tue, Mar 30, 2021 at 01:01:52PM +0300, Dan Carpenter wrote:
> drivers/gpu/drm/i915/i915_mm.c:76 remap_io_sg() error: uninitialized symbol 'err'.

Having an SGL where the first entry has a 0 dma_length is not valid.
That being said, the trivial patch below will remove the warning and
is otherwise harmless, so we could fold it in:

diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c
index 4c8cd08c672d2d..25576fa73ff031 100644
--- a/drivers/gpu/drm/i915/i915_mm.c
+++ b/drivers/gpu/drm/i915/i915_mm.c
@@ -47,7 +47,7 @@ int remap_io_sg(struct vm_area_struct *vma,
 		struct scatterlist *sgl, resource_size_t iobase)
 {
 	unsigned long pfn, len, remapped = 0;
-	int err;
+	int err = 0;
 
 	/* We rely on prevalidation of the io-mapping to skip track_pfn(). */
 	GEM_BUG_ON((vma->vm_flags & EXPECTED_FLAGS) != EXPECTED_FLAGS);

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kbuild@lists.01.org, Christoph Hellwig <hch@lst.de>,
	lkp@intel.com, kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [linux-next:master 8015/8469] drivers/gpu/drm/i915/i915_mm.c:76 remap_io_sg() error: uninitialized symbol 'err'.
Date: Thu, 1 Apr 2021 09:55:02 +0200	[thread overview]
Message-ID: <20210401075502.GA28983@lst.de> (raw)
In-Reply-To: <20210330100152.GC2065@kadam>

On Tue, Mar 30, 2021 at 01:01:52PM +0300, Dan Carpenter wrote:
> drivers/gpu/drm/i915/i915_mm.c:76 remap_io_sg() error: uninitialized symbol 'err'.

Having an SGL where the first entry has a 0 dma_length is not valid.
That being said, the trivial patch below will remove the warning and
is otherwise harmless, so we could fold it in:

diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c
index 4c8cd08c672d2d..25576fa73ff031 100644
--- a/drivers/gpu/drm/i915/i915_mm.c
+++ b/drivers/gpu/drm/i915/i915_mm.c
@@ -47,7 +47,7 @@ int remap_io_sg(struct vm_area_struct *vma,
 		struct scatterlist *sgl, resource_size_t iobase)
 {
 	unsigned long pfn, len, remapped = 0;
-	int err;
+	int err = 0;
 
 	/* We rely on prevalidation of the io-mapping to skip track_pfn(). */
 	GEM_BUG_ON((vma->vm_flags & EXPECTED_FLAGS) != EXPECTED_FLAGS);


  reply	other threads:[~2021-04-01  7:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30 10:01 [linux-next:master 8015/8469] drivers/gpu/drm/i915/i915_mm.c:76 remap_io_sg() error: uninitialized symbol 'err' Dan Carpenter
2021-03-30 10:01 ` Dan Carpenter
2021-03-30 10:01 ` Dan Carpenter
2021-04-01  7:55 ` Christoph Hellwig [this message]
2021-04-01  7:55   ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2021-03-29 23:12 kernel test robot

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=20210401075502.GA28983@lst.de \
    --to=hch@lst.de \
    --cc=kbuild-all@lists.01.org \
    /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.