* [bug report] cxl: Prevent adapter reset if an active context exists
@ 2018-07-04 14:40 Dan Carpenter
2018-07-04 15:31 ` Vaibhav Jain
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2018-07-04 14:40 UTC (permalink / raw)
To: vaibhav; +Cc: linuxppc-dev
Hello Vaibhav Jain,
The patch 70b565bbdb91: "cxl: Prevent adapter reset if an active
context exists" from Oct 14, 2016, leads to the following static
checker warning:
drivers/misc/cxl/main.c:290 cxl_adapter_context_get()
warn: 'atomic_inc_unless_negative(&adapter->contexts_num)' is unsigned
drivers/misc/cxl/main.c
285 int cxl_adapter_context_get(struct cxl *adapter)
286 {
287 int rc;
288
289 rc = atomic_inc_unless_negative(&adapter->contexts_num);
290 return rc >= 0 ? 0 : -EBUSY;
atomic_inc_unless_negative() returns bool so it's always >= 0.
291 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-04 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-04 14:40 [bug report] cxl: Prevent adapter reset if an active context exists Dan Carpenter
2018-07-04 15:31 ` Vaibhav Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox