Re: [PATCH] IB/core: Add inline function to validate port

Leon Romanovsky
2017-01-26T12:59:56Z

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

On Thu, Jan 26, 2017 at 10:15:35AM +0200, Yuval Shaia wrote:
> On Wed, Jan 25, 2017 at 06:50:22PM +0200, Leon Romanovsky wrote:
> > On Wed, Jan 25, 2017 at 06:41:37PM +0200, Yuval Shaia wrote:
> > > Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > > ---
> > > drivers/infiniband/core/cache.c | 18 ++++++++----------
> > > drivers/infiniband/core/cma.c | 6 ++----
> > > drivers/infiniband/core/device.c | 4 ++--
> > > drivers/infiniband/core/verbs.c | 3 +--
> > > include/rdma/ib_verbs.h | 7 +++++++
> > > 5 files changed, 20 insertions(+), 18 deletions(-)
> >
> > Nice change, however all places are pretended with "!".
> > Can we change the name of function to something like
> > "rdma_is_port_invalid"?
>
> As a matter of fact this thought cross my mind as usually callers cares more
> about 'invalid port' and not 'valid port' because it is used as exit criteria
> from a function. But as Bart mentioned in other reply, positive looks
> better that negative.

I'm fine with both options.

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]