Content-Type: multipart/mixed; boundary="===============0695167400239990925==" MIME-Version: 1.0 From: Christoph Hellwig 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 Message-ID: <20210401075502.GA28983@lst.de> In-Reply-To: <20210330100152.GC2065@kadam> List-Id: --===============0695167400239990925== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 symb= ol '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 =3D 0; - int err; + int err =3D 0; = /* We rely on prevalidation of the io-mapping to skip track_pfn(). */ GEM_BUG_ON((vma->vm_flags & EXPECTED_FLAGS) !=3D EXPECTED_FLAGS); --===============0695167400239990925==--