From patchwork Thu Apr 27 14:17:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 9702917 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 39061602CC for ; Thu, 27 Apr 2017 14:17:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 275302654B for ; Thu, 27 Apr 2017 14:17:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B48A28634; Thu, 27 Apr 2017 14:17:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B88652654B for ; Thu, 27 Apr 2017 14:17:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937606AbdD0ORa (ORCPT ); Thu, 27 Apr 2017 10:17:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:38621 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S937599AbdD0ORa (ORCPT ); Thu, 27 Apr 2017 10:17:30 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8BB80AC3B; Thu, 27 Apr 2017 14:17:20 +0000 (UTC) From: Hannes Reinecke To: Nic Bellinger Cc: Bart van Assche , target-devel@vger.kernel.org, linux-scsi@vger.kernel.org, Hannes Reinecke Subject: target: fixup error message in target_tg_pt_gp_tg_pt_gp_id_store() Date: Thu, 27 Apr 2017 16:17:18 +0200 Message-Id: <1493302638-113622-1-git-send-email-hare@suse.de> X-Mailer: git-send-email 1.8.5.6 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When setting up an ALUA target port group with an invalid ID the error message kstrtoul() returned -22 for tg_pt_gp_id is displayed, which is not really helpful. Convert it to something sane. Reviewed-by: Hannes Reinecke --- drivers/target/target_core_configfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c index 1f229cc..27f7411 100644 --- a/drivers/target/target_core_configfs.c +++ b/drivers/target/target_core_configfs.c @@ -2691,8 +2691,8 @@ static ssize_t target_tg_pt_gp_tg_pt_gp_id_store(struct config_item *item, ret = kstrtoul(page, 0, &tg_pt_gp_id); if (ret < 0) { - pr_err("kstrtoul() returned %d for" - " tg_pt_gp_id\n", ret); + pr_err("ALUA tg_pt_gp_id: invalid value '%s' for" + " tg_pt_gp_id\n", page); return ret; } if (tg_pt_gp_id > 0x0000ffff) {