All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fault-inject: Declare the second argument of setup_fault_attr() const
@ 2021-07-09 20:26 Bart Van Assche
  2021-07-09 20:26 ` [PATCH v2 00/19] UFS patches for kernel v5.15 Bart Van Assche
                   ` (20 more replies)
  0 siblings, 21 replies; 41+ messages in thread
From: Bart Van Assche @ 2021-07-09 20:26 UTC (permalink / raw)
  To: Martin K . Petersen
  Cc: linux-scsi, Jaegeuk Kim, Bart Van Assche, Akinobu Mita

This patch makes it possible to pass a const char * argument to
setup_fault_attr() without having to cast away constness.

Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 include/linux/fault-inject.h | 2 +-
 lib/fault-inject.c           | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/fault-inject.h b/include/linux/fault-inject.h
index e525f6957c49..afc649f0102b 100644
--- a/include/linux/fault-inject.h
+++ b/include/linux/fault-inject.h
@@ -42,7 +42,7 @@ struct fault_attr {
 	}
 
 #define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER
-int setup_fault_attr(struct fault_attr *attr, char *str);
+int setup_fault_attr(struct fault_attr *attr, const char *str);
 bool should_fail(struct fault_attr *attr, ssize_t size);
 
 #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS
diff --git a/lib/fault-inject.c b/lib/fault-inject.c
index ce12621b4275..45520151b32d 100644
--- a/lib/fault-inject.c
+++ b/lib/fault-inject.c
@@ -15,7 +15,7 @@
  * setup_fault_attr() is a helper function for various __setup handlers, so it
  * returns 0 on error, because that is what __setup handlers do.
  */
-int setup_fault_attr(struct fault_attr *attr, char *str)
+int setup_fault_attr(struct fault_attr *attr, const char *str)
 {
 	unsigned long probability;
 	unsigned long interval;

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

end of thread, other threads:[~2021-07-16 17:51 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 20:26 [PATCH] fault-inject: Declare the second argument of setup_fault_attr() const Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 00/19] UFS patches for kernel v5.15 Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 01/19] scsi: Fix the documentation of the scsi_execute() time parameter Bart Van Assche
2021-07-10  8:17   ` Hannes Reinecke
2021-07-13  1:40   ` Martin K. Petersen
2021-07-09 20:26 ` [PATCH v2 02/19] scsi: ufs: Reduce power management code duplication Bart Van Assche
2021-07-14  9:24   ` Bean Huo
2021-07-09 20:26 ` [PATCH v2 03/19] scsi: ufs: Only include power management code if necessary Bart Van Assche
2021-07-14 20:38   ` Bean Huo
2021-07-09 20:26 ` [PATCH v2 04/19] scsi: ufs: Rename the second ufshcd_probe_hba() argument Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 05/19] scsi: ufs: Use DECLARE_COMPLETION_ONSTACK() where appropriate Bart Van Assche
2021-07-14 20:40   ` Bean Huo
2021-07-09 20:26 ` [PATCH v2 06/19] scsi: ufs: Remove ufshcd_valid_tag() Bart Van Assche
2021-07-14 21:10   ` Bean Huo
2021-07-09 20:26 ` [PATCH v2 07/19] scsi: ufs: Verify UIC locking requirements at runtime Bart Van Assche
2021-07-14 21:14   ` Bean Huo
2021-07-09 20:26 ` [PATCH v2 08/19] scsi: ufs: Improve static type checking for the host controller state Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 09/19] scsi: ufs: Remove several wmb() calls Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 10/19] scsi: ufs: Inline ufshcd_outstanding_req_clear() Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 11/19] scsi: ufs: Rename __ufshcd_transfer_req_compl() Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 12/19] scsi: ufs: Remove a local variable Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 13/19] scsi: ufs: Fix a race in the completion path Bart Van Assche
2021-07-11 12:29   ` Avri Altman
2021-07-11 12:37     ` Avri Altman
2021-07-13 16:49     ` Bart Van Assche
2021-07-13 23:26       ` Bart Van Assche
2021-07-16 12:39         ` Avri Altman
2021-07-16 16:26           ` Asutosh Das (asd)
2021-07-16 16:54             ` Bart Van Assche
2021-07-16 17:51               ` Bart Van Assche
2021-07-16 16:50           ` Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 14/19] scsi: ufs: Use the doorbell register instead of the UTRLCNR register Bart Van Assche
2021-07-16  8:59   ` Avri Altman
2021-07-09 20:26 ` [PATCH v2 15/19] scsi: ufs: Fix the SCSI abort handler Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 16/19] scsi: ufs: Request sense data asynchronously Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 17/19] scsi: ufs: Synchronize SCSI and UFS error handling Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 18/19] scsi: ufs: Retry aborted SCSI commands instead of completing these successfully Bart Van Assche
2021-07-09 20:26 ` [PATCH v2 19/19] scsi: ufs: Add fault injection support Bart Van Assche
2021-07-09 21:56   ` Randy Dunlap
2021-07-09 22:45     ` Bart Van Assche
2021-07-09 20:32 ` [PATCH] fault-inject: Declare the second argument of setup_fault_attr() const Bart Van Assche

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.