On Fri, Sep 30, 2016 at 02:37:01PM +0300, Dan Carpenter wrote:
> Hello Martyn Welch,
>
> The patch 658bcdae9c67: "vme: Adding Fake VME driver" from Jul 7,
> 2016, leads to the following static checker warning:
>
> drivers/vme/bridges/vme_fake.c:338 fake_master_set()
> warn: 'spin_lock:&image->lock' is sometimes locked here and sometimes
> unlocked.
>
> drivers/vme/bridges/vme_fake.c
> 255 static int fake_master_set(struct vme_master_resource *image, int
> enabled,
> 256 unsigned long long vme_base, unsigned long long size,
> 257 u32 aspace, u32 cycle, u32 dwidth)
> 258 {
> 259 int retval = 0;
> 260 unsigned int i;
> 261 struct vme_bridge *fake_bridge;
> 262 struct fake_driver *bridge;
> 263
> 264 fake_bridge = image->parent;
> 265
> 266 bridge = fake_bridge->driver_priv;
> 267
> 268 /* Verify input data */
> 269 if (vme_base & 0xFFFF) {
>
> Unlock?
>
Wei Yongjun removed the spurious spin_unlock()'s in the other code paths in
commit db08948b97180a3c9f49ce91caf1fb643a8110be. I assume that was why the
static checker was suggesting locking here...
Martyn
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel