Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

slimbus: ngd: remove unnecessary check

SLIM_MSG_CLK_PAUSE_SEQ_FLG is never set in any of the slim core,
so performing a check in ngd driver is totally unnecessary.

Also this patch fixes warning about mc field overflow reported
with CoverityScan.

Making clk pause feature optional will be added to slim core in
next development cycle.

Reported-by: Colin Ian King <colin.king@canonical.com>
Fixes: 917809e2280b ("slimbus: ngd: Add qcom SLIMBus NGD driver")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Srinivas Kandagatla and committed by
Greg Kroah-Hartman
94312641 65102238

-9
-3
drivers/slimbus/qcom-ngd-ctrl.c
··· 777 777 u8 la = txn->la; 778 778 bool usr_msg = false; 779 779 780 - if (txn->mc & SLIM_MSG_CLK_PAUSE_SEQ_FLG) 781 - return -EPROTONOSUPPORT; 782 - 783 780 if (txn->mt == SLIM_MSG_MT_CORE && 784 781 (txn->mc >= SLIM_MSG_MC_BEGIN_RECONFIGURATION && 785 782 txn->mc <= SLIM_MSG_MC_RECONFIGURE_NOW))
-6
drivers/slimbus/slimbus.h
··· 61 61 #define SLIM_MSG_MC_NEXT_REMOVE_CHANNEL 0x58 62 62 #define SLIM_MSG_MC_RECONFIGURE_NOW 0x5F 63 63 64 - /* 65 - * Clock pause flag to indicate that the reconfig message 66 - * corresponds to clock pause sequence 67 - */ 68 - #define SLIM_MSG_CLK_PAUSE_SEQ_FLG (1U << 8) 69 - 70 64 /* Clock pause values per SLIMbus spec */ 71 65 #define SLIM_CLK_FAST 0 72 66 #define SLIM_CLK_CONST_PHASE 1