Skip to content

Commit 7abd75b

Browse files
Nishanth Aravamudanherbertx
authored andcommitted
crypto: nx - do not emit extra output if status is disabled
If the device-tree indicates the nx-842 device's status is 'disabled', we emit two messages: nx_compress_pseries ibm,compression-v1: nx842_OF_upd_status: status 'disabled' is not 'okay'. nx_compress_pseries ibm,compression-v1: nx842_OF_upd: device disabled Given that 'disabled' is a valid state, and we are going to emit that the device is disabled, only print out a non-'okay' status if it is not 'disabled'. Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent ec13bcb commit 7abd75b

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎drivers/crypto/nx/nx-842-pseries.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,14 @@ static int nx842_OF_upd_status(struct nx842_devdata *devdata,
566566
if (!strncmp(status, "okay", (size_t)prop->length)) {
567567
devdata->status = AVAILABLE;
568568
} else {
569-
dev_info(devdata->dev, "%s: status '%s' is not 'okay'\n",
569+
/*
570+
* Caller will log that the device is disabled, so only
571+
* output if there is an unexpected status.
572+
*/
573+
if (strncmp(status, "disabled", (size_t)prop->length)) {
574+
dev_info(devdata->dev, "%s: status '%s' is not 'okay'\n",
570575
__func__, status);
576+
}
571577
devdata->status = UNAVAILABLE;
572578
ret = -ENODEV;
573579
}

0 commit comments

Comments
 (0)