From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta0.migadu.com (out-173.mta0.migadu.com [91.218.175.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01BBE1F37BC for ; Tue, 11 Feb 2025 10:27:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739269644; cv=none; b=CjY10rkkfKPlB9QLWRzlv2CG6ooXIyGAyb3SzrXXLd87BdfQgjmPs+K1w8AO6dsbG1WfRTNanuYadNMBld5bWHoNXHjYcXQPAnZNyXK6JCyj/+yWAZurVGMSE5PFIFbSzNYwUFSAZcfIwUyGW/a5pEH1eRFpHhaDs2GFqDSi75k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739269644; c=relaxed/simple; bh=umBuQl2QuBFeO9IxtwbPuUMLEtLD5ox0Hz4hVd/Q4JE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=utiTSrVaHZtngzqegkCNvKLhUPZg50vg5ipwlu+jlscu5yXranC2rX1BUaNMo7umsxtHirnrPvJGvUsR1Rc4/octHcvkwWaiSxV/Ucvhi28GxS89CwYtjM+PRO/8hrw04wAietajqq01921a6tGQuqEJvk8HvUbCzYvYgrPno8o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=W0WwM2hZ; arc=none smtp.client-ip=91.218.175.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="W0WwM2hZ" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1739269631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=FSnRdmhAXCNG5wX/lQk1babI2j58rDjAV131IDGWdyI=; b=W0WwM2hZp70eEka1ECIDeM1z6VCp2PSS2MycHKCS9dyWaREbLtTz7+jx/ClDJE8cg4fmU+ ABQsiPT1d+aq5t8OceOB8t/K6uMwz7oJ5iG3pGIKQG5+FLUeCAEvn/1mnnvoMro/ANg9lE 5pGlTyOidzjyQjQVqDOwROCA/1UpYCg= From: Thorsten Blum To: Don Brace , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Thorsten Blum , storagedev@microchip.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: hpsa: Use str_enabled_disabled() helper function Date: Tue, 11 Feb 2025 11:26:42 +0100 Message-ID: <20250211102643.614133-1-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum --- drivers/scsi/hpsa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 84d8de07b7ae..ff49e93df4ed 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -469,7 +470,7 @@ static ssize_t host_store_hp_ssd_smart_path_status(struct device *dev, h->acciopath_status = !!status; dev_warn(&h->pdev->dev, "hpsa: HP SSD Smart Path %s via sysfs update.\n", - h->acciopath_status ? "enabled" : "disabled"); + str_enabled_disabled(h->acciopath_status)); return count; } @@ -560,7 +561,7 @@ static ssize_t host_show_hp_ssd_smart_path_status(struct device *dev, h = shost_to_hba(shost); return snprintf(buf, 30, "HP SSD Smart Path %s\n", - (h->acciopath_status == 1) ? "enabled" : "disabled"); + str_enabled_disabled(h->acciopath_status == 1)); } /* List of controllers which cannot be hard reset on kexec with reset_devices */ -- 2.48.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B256E26738F for ; Tue, 25 Feb 2025 09:41:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740476493; cv=none; b=a9NTlzUGvAmArlC3RGEJiCwwgw9efhDQFKqEEnnDdXhrD0wzovlNrSLkLTlsryiT1Ex5Zz1UWx0lW7uvRzg6bgs+MgtQyDWCTGAIyLyzfxruOL6K+wKVY7cL5eBjuKBgBE74om4OCYlhT2wD0y7Y0yIDolU/F5bVXAmf2qIoGF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740476493; c=relaxed/simple; bh=umBuQl2QuBFeO9IxtwbPuUMLEtLD5ox0Hz4hVd/Q4JE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=G1j4jJAWyBMHp8bBiTfZs6g3/9MSXN07Do+IxdBUk8Xzh3ousCDcYx070lxmPODSOp0+FNu/pNOkUh2ZplLe+rLqWcAjYVwCDHR/4nBcZe6cmBH9KMV44FCrTewOJ0s0Tbo+pjwKxQXLMGHinL4OaYPLQlnS1iHTl3EBgFhJfDs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=g80bBMzR; arc=none smtp.client-ip=91.218.175.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="g80bBMzR" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1740476488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FSnRdmhAXCNG5wX/lQk1babI2j58rDjAV131IDGWdyI=; b=g80bBMzRzAMxcAYS974A5/dRA0qkOeAEES2zpvFW3TWPKX2tuTB/O01ifs7pzhaVMsJM0L +x9/N3ZwZI/rgXAbH8007GRDKmq/oVmWyJn3dyrMnZhpU8t3ggnf6iaxV+2YJCkpy1IeZi 262j01ErZq73lXdNqbGprfCvTZdZUkI= From: Thorsten Blum To: Don Brace , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Thorsten Blum , storagedev@microchip.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND] scsi: hpsa: Use str_enabled_disabled() helper function Date: Tue, 25 Feb 2025 10:41:08 +0100 Message-ID: <20250211102643.614133-1-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Message-ID: <20250225094108.yqDeWUIAi5BR5vW08rCu7S4nGFGWkdZA_m_ykgwgJgk@z> Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum --- drivers/scsi/hpsa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 84d8de07b7ae..ff49e93df4ed 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -469,7 +470,7 @@ static ssize_t host_store_hp_ssd_smart_path_status(struct device *dev, h->acciopath_status = !!status; dev_warn(&h->pdev->dev, "hpsa: HP SSD Smart Path %s via sysfs update.\n", - h->acciopath_status ? "enabled" : "disabled"); + str_enabled_disabled(h->acciopath_status)); return count; } @@ -560,7 +561,7 @@ static ssize_t host_show_hp_ssd_smart_path_status(struct device *dev, h = shost_to_hba(shost); return snprintf(buf, 30, "HP SSD Smart Path %s\n", - (h->acciopath_status == 1) ? "enabled" : "disabled"); + str_enabled_disabled(h->acciopath_status == 1)); } /* List of controllers which cannot be hard reset on kexec with reset_devices */ -- 2.48.1