All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i40iw: Remove macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG
@ 2016-10-05 11:55 Thomas Huth
       [not found] ` <1475668538-12914-1-git-send-email-thuth-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Huth @ 2016-10-05 11:55 UTC (permalink / raw)
  To: Faisal Latif, linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: Chien Tin Tung, Mustafa Ismail, Shiraz Saleem, Tatyana Nikolova,
	Doug Ledford, Sean Hefty, Hal Rosenstock

The macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG are
apparently bad - they are using the logical "&&" operation which
does not make sense here. It should have been a bitwise "&" instead.
Since the macros seem to be completely unused, let's simply remove
them so that nobody accidentially uses them in the future. And while
we're at it, also remove the unused macro I40IW_CREATE_STAG.

Signed-off-by: Thomas Huth <thuth-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 drivers/infiniband/hw/i40iw/i40iw_user.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_user.h b/drivers/infiniband/hw/i40iw/i40iw_user.h
index 276bcef..0d91667 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_user.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_user.h
@@ -96,12 +96,6 @@ enum i40iw_device_capabilities_const {
 #define i40iw_physical_fragment u64
 #define i40iw_address_list u64 *
 
-#define I40IW_CREATE_STAG(index, key)       (((index) << 8) + (key))
-
-#define I40IW_STAG_KEY_FROM_STAG(stag)      ((stag) && 0x000000FF)
-
-#define I40IW_STAG_INDEX_FROM_STAG(stag)    (((stag) && 0xFFFFFF00) >> 8)
-
 #define	I40IW_MAX_MR_SIZE	0x10000000000L
 
 struct i40iw_qp_uk;
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] i40iw: Remove macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG
       [not found] ` <1475668538-12914-1-git-send-email-thuth-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2016-10-05 12:57   ` Leon Romanovsky
       [not found]     ` <20161005125711.GG9282-2ukJVAZIZ/Y@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2016-10-05 12:57 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Faisal Latif, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Chien Tin Tung,
	Mustafa Ismail, Shiraz Saleem, Tatyana Nikolova, Doug Ledford,
	Sean Hefty, Hal Rosenstock

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

On Wed, Oct 05, 2016 at 01:55:38PM +0200, Thomas Huth wrote:
> The macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG are
> apparently bad - they are using the logical "&&" operation which
> does not make sense here. It should have been a bitwise "&" instead.
> Since the macros seem to be completely unused, let's simply remove
> them so that nobody accidentially uses them in the future. And while
> we're at it, also remove the unused macro I40IW_CREATE_STAG.
>
> Signed-off-by: Thomas Huth <thuth-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i40iw: Remove macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG
       [not found]     ` <20161005125711.GG9282-2ukJVAZIZ/Y@public.gmane.org>
@ 2016-10-06 20:02       ` Faisal Latif
  2016-12-12 22:15         ` Doug Ledford
  0 siblings, 1 reply; 4+ messages in thread
From: Faisal Latif @ 2016-10-06 20:02 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Thomas Huth, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Chien Tin Tung,
	Mustafa Ismail, Shiraz Saleem, Tatyana Nikolova, Doug Ledford,
	Sean Hefty, Hal Rosenstock

On Wed, Oct 05, 2016 at 03:57:11PM +0300, Leon Romanovsky wrote:
> On Wed, Oct 05, 2016 at 01:55:38PM +0200, Thomas Huth wrote:
> > The macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG are
> > apparently bad - they are using the logical "&&" operation which
> > does not make sense here. It should have been a bitwise "&" instead.
> > Since the macros seem to be completely unused, let's simply remove
> > them so that nobody accidentially uses them in the future. And while
> > we're at it, also remove the unused macro I40IW_CREATE_STAG.
> >
> > Signed-off-by: Thomas Huth <thuth-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> 
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Thanks
Acked-by: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] i40iw: Remove macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG
  2016-10-06 20:02       ` Faisal Latif
@ 2016-12-12 22:15         ` Doug Ledford
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Ledford @ 2016-12-12 22:15 UTC (permalink / raw)
  To: Faisal Latif, Leon Romanovsky
  Cc: Thomas Huth, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Chien Tin Tung,
	Mustafa Ismail, Shiraz Saleem, Tatyana Nikolova, Sean Hefty,
	Hal Rosenstock


[-- Attachment #1.1: Type: text/plain, Size: 1014 bytes --]

On 10/6/2016 4:02 PM, Faisal Latif wrote:
> On Wed, Oct 05, 2016 at 03:57:11PM +0300, Leon Romanovsky wrote:
>> On Wed, Oct 05, 2016 at 01:55:38PM +0200, Thomas Huth wrote:
>>> The macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG are
>>> apparently bad - they are using the logical "&&" operation which
>>> does not make sense here. It should have been a bitwise "&" instead.
>>> Since the macros seem to be completely unused, let's simply remove
>>> them so that nobody accidentially uses them in the future. And while
>>> we're at it, also remove the unused macro I40IW_CREATE_STAG.
>>>
>>> Signed-off-by: Thomas Huth <thuth-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>
>> Thanks,
>> Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> Thanks
> Acked-by: Faisal Latif <faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> 

Applied, thanks.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG Key ID: 0E572FDD


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-12 22:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-05 11:55 [PATCH] i40iw: Remove macros I40IW_STAG_KEY_FROM_STAG and I40IW_STAG_INDEX_FROM_STAG Thomas Huth
     [not found] ` <1475668538-12914-1-git-send-email-thuth-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-05 12:57   ` Leon Romanovsky
     [not found]     ` <20161005125711.GG9282-2ukJVAZIZ/Y@public.gmane.org>
2016-10-06 20:02       ` Faisal Latif
2016-12-12 22:15         ` Doug Ledford

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.