Commit 5fc24e6
committed
RDMA/rxe: Fix compile warnings on 32-bit
Move the conditional code into a function, with two varients so it is
harder to make these kinds of mistakes.
drivers/infiniband/sw/rxe/rxe_resp.c: In function 'atomic_write_reply':
drivers/infiniband/sw/rxe/rxe_resp.c:794:13: error: unused variable 'payload' [-Werror=unused-variable]
794 | int payload = payload_size(pkt);
| ^~~~~~~
drivers/infiniband/sw/rxe/rxe_resp.c:793:24: error: unused variable 'mr' [-Werror=unused-variable]
793 | struct rxe_mr *mr = qp->resp.mr;
| ^~
drivers/infiniband/sw/rxe/rxe_resp.c:791:19: error: unused variable 'dst' [-Werror=unused-variable]
791 | u64 src, *dst;
| ^~~
drivers/infiniband/sw/rxe/rxe_resp.c:791:13: error: unused variable 'src' [-Werror=unused-variable]
791 | u64 src, *dst;
Fixes: 034e285 ("RDMA/rxe: Make responder support atomic write on RC service")
Link: https://lore.kernel.org/linux-rdma/Y5s+EVE7eLWQqOwv@nvidia.com/
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>1 parent dbc94a0 commit 5fc24e6
1 file changed
Lines changed: 40 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
788 | | - | |
789 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
790 | 791 | | |
791 | | - | |
792 | | - | |
793 | 792 | | |
794 | 793 | | |
| 794 | + | |
795 | 795 | | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
| 796 | + | |
| 797 | + | |
807 | 798 | | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
| 799 | + | |
812 | 800 | | |
813 | | - | |
814 | | - | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
815 | 805 | | |
816 | | - | |
817 | | - | |
| 806 | + | |
| 807 | + | |
818 | 808 | | |
819 | | - | |
| 809 | + | |
| 810 | + | |
820 | 811 | | |
821 | | - | |
822 | | - | |
823 | | - | |
| 812 | + | |
824 | 813 | | |
825 | | - | |
826 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
827 | 817 | | |
828 | | - | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
829 | 822 | | |
830 | | - | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
831 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
832 | 838 | | |
833 | 839 | | |
834 | | - | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
835 | 843 | | |
836 | 844 | | |
837 | 845 | | |
| |||
0 commit comments