diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2019-07-28 19:23:46 -0400 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-08-02 07:58:23 -0400 |
commit | 3cdd98606750a5a1d1c8bcda5b481cb86ed67b3b (patch) | |
tree | 31359314a97e0cc41dbf969673cd1209555f4139 | |
parent | 8480657280ee769ad23101297e1e6be0f8d205ec (diff) |
s390/zcrypt: adjust switch fall through comments for -Wimplicit-fallthrough
Silence the following warnings when built with -Wimplicit-fallthrough=3
enabled by default since 5.3-rc2:
In file included from ./include/linux/preempt.h:11,
from ./include/linux/spinlock.h:51,
from ./include/linux/mmzone.h:8,
from ./include/linux/gfp.h:6,
from ./include/linux/slab.h:15,
from drivers/s390/crypto/ap_queue.c:13:
drivers/s390/crypto/ap_queue.c: In function 'ap_sm_recv':
./include/linux/list.h:577:2: warning: this statement may fall through [-Wimplicit-fallthrough=]
577 | for (pos = list_first_entry(head, typeof(*pos), member); \
| ^~~
drivers/s390/crypto/ap_queue.c:147:3: note: in expansion of macro 'list_for_each_entry'
147 | list_for_each_entry(ap_msg, &aq->pendingq, list) {
| ^~~~~~~~~~~~~~~~~~~
drivers/s390/crypto/ap_queue.c:155:2: note: here
155 | case AP_RESPONSE_NO_PENDING_REPLY:
| ^~~~
drivers/s390/crypto/zcrypt_msgtype6.c: In function 'convert_response_ep11_xcrb':
drivers/s390/crypto/zcrypt_msgtype6.c:871:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
871 | if (msg->cprbx.cprb_ver_id == 0x04)
| ^
drivers/s390/crypto/zcrypt_msgtype6.c:874:2: note: here
874 | default: /* Unknown response type, this should NEVER EVER happen */
| ^~~~~~~
drivers/s390/crypto/zcrypt_msgtype6.c: In function 'convert_response_rng':
drivers/s390/crypto/zcrypt_msgtype6.c:901:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
901 | if (msg->cprbx.cprb_ver_id == 0x02)
| ^
drivers/s390/crypto/zcrypt_msgtype6.c:907:2: note: here
907 | default: /* Unknown response type, this should NEVER EVER happen */
| ^~~~~~~
drivers/s390/crypto/zcrypt_msgtype6.c: In function 'convert_response_xcrb':
drivers/s390/crypto/zcrypt_msgtype6.c:838:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
838 | if (msg->cprbx.cprb_ver_id == 0x02)
| ^
drivers/s390/crypto/zcrypt_msgtype6.c:844:2: note: here
844 | default: /* Unknown response type, this should NEVER EVER happen */
| ^~~~~~~
drivers/s390/crypto/zcrypt_msgtype6.c: In function 'convert_response_ica':
drivers/s390/crypto/zcrypt_msgtype6.c:801:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
801 | if (msg->cprbx.cprb_ver_id == 0x02)
| ^
drivers/s390/crypto/zcrypt_msgtype6.c:808:2: note: here
808 | default: /* Unknown response type, this should NEVER EVER happen */
| ^~~~~~~
Acked-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r-- | drivers/s390/crypto/ap_queue.c | 1 | ||||
-rw-r--r-- | drivers/s390/crypto/zcrypt_msgtype6.c | 17 |
2 files changed, 5 insertions, 13 deletions
diff --git a/drivers/s390/crypto/ap_queue.c b/drivers/s390/crypto/ap_queue.c index 5ea83dc4f1d7..dad2be333d82 100644 --- a/drivers/s390/crypto/ap_queue.c +++ b/drivers/s390/crypto/ap_queue.c | |||
@@ -152,6 +152,7 @@ static struct ap_queue_status ap_sm_recv(struct ap_queue *aq) | |||
152 | ap_msg->receive(aq, ap_msg, aq->reply); | 152 | ap_msg->receive(aq, ap_msg, aq->reply); |
153 | break; | 153 | break; |
154 | } | 154 | } |
155 | /* fall through */ | ||
155 | case AP_RESPONSE_NO_PENDING_REPLY: | 156 | case AP_RESPONSE_NO_PENDING_REPLY: |
156 | if (!status.queue_empty || aq->queue_count <= 0) | 157 | if (!status.queue_empty || aq->queue_count <= 0) |
157 | break; | 158 | break; |
diff --git a/drivers/s390/crypto/zcrypt_msgtype6.c b/drivers/s390/crypto/zcrypt_msgtype6.c index 12fe9deb265e..a36251d138fb 100644 --- a/drivers/s390/crypto/zcrypt_msgtype6.c +++ b/drivers/s390/crypto/zcrypt_msgtype6.c | |||
@@ -801,10 +801,7 @@ static int convert_response_ica(struct zcrypt_queue *zq, | |||
801 | if (msg->cprbx.cprb_ver_id == 0x02) | 801 | if (msg->cprbx.cprb_ver_id == 0x02) |
802 | return convert_type86_ica(zq, reply, | 802 | return convert_type86_ica(zq, reply, |
803 | outputdata, outputdatalength); | 803 | outputdata, outputdatalength); |
804 | /* | 804 | /* fall through - wrong cprb version is an unknown response */ |
805 | * Fall through, no break, incorrect cprb version is an unknown | ||
806 | * response | ||
807 | */ | ||
808 | default: /* Unknown response type, this should NEVER EVER happen */ | 805 | default: /* Unknown response type, this should NEVER EVER happen */ |
809 | zq->online = 0; | 806 | zq->online = 0; |
810 | pr_err("Cryptographic device %02x.%04x failed and was set offline\n", | 807 | pr_err("Cryptographic device %02x.%04x failed and was set offline\n", |
@@ -837,10 +834,7 @@ static int convert_response_xcrb(struct zcrypt_queue *zq, | |||
837 | } | 834 | } |
838 | if (msg->cprbx.cprb_ver_id == 0x02) | 835 | if (msg->cprbx.cprb_ver_id == 0x02) |
839 | return convert_type86_xcrb(zq, reply, xcRB); | 836 | return convert_type86_xcrb(zq, reply, xcRB); |
840 | /* | 837 | /* fall through - wrong cprb version is an unknown response */ |
841 | * Fall through, no break, incorrect cprb version is an unknown | ||
842 | * response | ||
843 | */ | ||
844 | default: /* Unknown response type, this should NEVER EVER happen */ | 838 | default: /* Unknown response type, this should NEVER EVER happen */ |
845 | xcRB->status = 0x0008044DL; /* HDD_InvalidParm */ | 839 | xcRB->status = 0x0008044DL; /* HDD_InvalidParm */ |
846 | zq->online = 0; | 840 | zq->online = 0; |
@@ -870,7 +864,7 @@ static int convert_response_ep11_xcrb(struct zcrypt_queue *zq, | |||
870 | return convert_error(zq, reply); | 864 | return convert_error(zq, reply); |
871 | if (msg->cprbx.cprb_ver_id == 0x04) | 865 | if (msg->cprbx.cprb_ver_id == 0x04) |
872 | return convert_type86_ep11_xcrb(zq, reply, xcRB); | 866 | return convert_type86_ep11_xcrb(zq, reply, xcRB); |
873 | /* Fall through, no break, incorrect cprb version is an unknown resp.*/ | 867 | /* fall through - wrong cprb version is an unknown resp */ |
874 | default: /* Unknown response type, this should NEVER EVER happen */ | 868 | default: /* Unknown response type, this should NEVER EVER happen */ |
875 | zq->online = 0; | 869 | zq->online = 0; |
876 | pr_err("Cryptographic device %02x.%04x failed and was set offline\n", | 870 | pr_err("Cryptographic device %02x.%04x failed and was set offline\n", |
@@ -900,10 +894,7 @@ static int convert_response_rng(struct zcrypt_queue *zq, | |||
900 | return -EINVAL; | 894 | return -EINVAL; |
901 | if (msg->cprbx.cprb_ver_id == 0x02) | 895 | if (msg->cprbx.cprb_ver_id == 0x02) |
902 | return convert_type86_rng(zq, reply, data); | 896 | return convert_type86_rng(zq, reply, data); |
903 | /* | 897 | /* fall through - wrong cprb version is an unknown response */ |
904 | * Fall through, no break, incorrect cprb version is an unknown | ||
905 | * response | ||
906 | */ | ||
907 | default: /* Unknown response type, this should NEVER EVER happen */ | 898 | default: /* Unknown response type, this should NEVER EVER happen */ |
908 | zq->online = 0; | 899 | zq->online = 0; |
909 | pr_err("Cryptographic device %02x.%04x failed and was set offline\n", | 900 | pr_err("Cryptographic device %02x.%04x failed and was set offline\n", |