> -----Original Message----- > From: Dan Williams [mailto:[email protected]] > Sent: Tuesday, January 22, 2019 4:24 PM > To: Elliott, Robert (Persistent Memory) <[email protected]> > Cc: linux-nvdimm <[email protected]> > Subject: Re: [PATCH] libnvdimm: normalize dev_debug failed and succeeded > wording > > Looks ok, just some formatting nits... > > On Tue, Jan 22, 2019 at 2:14 PM Robert Elliott <[email protected]> wrote: > > > > if (rc < 0) { > > nvdimm_put_key(key); > > key = NULL; > > - } > > + dev_dbg(dev, "key: %d revalidation failed: %d\n", > > + key_serial(key), rc); > > + } else > > + dev_dbg(dev, "key: %d revalidation succeeded\n", > > + key_serial(key)); > > For all of these success vs fail cases I would prefer to continue to > use a ternary: > > dev_dbg(dev, "key: %d revalidation %s: %d\n", > key_serial(key), rc == 0 ? "succeeded" : "failed", rc); > > ...as to not clutter the code with extra debug statements. That'll result in printing the return code for successful cases: ...succeeded: 0 I guess that's fine for the dev_dbg level. _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
RE: [PATCH] libnvdimm: normalize dev_debug failed and succeeded wording
Elliott, Robert (Persistent Memory) Tue, 22 Jan 2019 15:14:12 -0800
- [PATCH] libnvdimm: normalize dev_debug... Robert Elliott
- Re: [PATCH] libnvdimm: normalize ... Dan Williams
- RE: [PATCH] libnvdimm: normal... Elliott, Robert (Persistent Memory)
- Re: [PATCH] libnvdimm: no... Dan Williams
