From patchwork Thu Jun 30 02:38:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhijian Li (Fujitsu)" X-Patchwork-Id: 12901006 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92A34C43334 for ; Thu, 30 Jun 2022 02:39:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231878AbiF3CjC (ORCPT ); Wed, 29 Jun 2022 22:39:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231886AbiF3Ciq (ORCPT ); Wed, 29 Jun 2022 22:38:46 -0400 Received: from esa6.fujitsucc.c3s2.iphmx.com (esa6.fujitsucc.c3s2.iphmx.com [68.232.159.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FD8D403D4; Wed, 29 Jun 2022 19:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1656556702; x=1688092702; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=dF0GoSKOgWBvIwsNV3121n3vXOSj5NzFsxONJyY8Jcw=; b=t6KbFRKgR+qoE/1GzO9926Qtpp1zsUNGZjCRBSzOJA6Vbp6igrmByAOJ 3Wjanll5dA8dWGJOUVtQYrdFaG8RO2FjVd6je8JAoFjhYqc2Ck0yaddfa nlkY4VE7APRQZ2SgpDGUkD13VufUE5D1b6hpSVKEwOzWF2D6Gtw1CeaFu iOtswViNJUteJtgdMRKqDbgKyFoIZ7rOkFn8wN+3KqHfh+INCy0jVnxbH Apn9BhGWl+cSw9R6f8AR1GAyIsNn1GCiCoSz7f/sGAVuhSq3BMWUFa8qZ RwflWuZCbLSagW1nxFiQZGxPTI+v8O18RioF4ukBDMEJJojjwN5mPuhFK w==; X-IronPort-AV: E=McAfee;i="6400,9594,10393"; a="59301015" X-IronPort-AV: E=Sophos;i="5.92,232,1650898800"; d="scan'208";a="59301015" Received: from mail-tycjpn01lp2177.outbound.protection.outlook.com (HELO JPN01-TYC-obe.outbound.protection.outlook.com) ([104.47.23.177]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2022 11:38:14 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XaArduSNbB5U0RQbcc8Pn3j280wpzlSnAkMxgv38eHfgFMqlpL+Ckvlpx/ExzlUXse6LBmB2vRNKL66ZQZXrSNGVutlgyDwrTyPepVJpM+huKP91rMWeyzsywzPX2bYrwoPGjjUmLg5HZH1a5liPA4zMWj4QdvgqZ/9PFhXazht+esdI3PUuejVCFWB279oRyuo+2HPPCVHZM7te70nUt2JTZlTlKOoC401mw2poHLhPVCSfQvoVkXY7JiwQrso/PNDLU3HmleZBr2P35RN98iLncTsFZ/Rso0jykcr2DfrtCYlIyZdjziYFYSUGXZh78PgN1toc5hB+hRn7THt9mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dF0GoSKOgWBvIwsNV3121n3vXOSj5NzFsxONJyY8Jcw=; b=YDTNK1v8RQ2JRijKlTNCiPWm9lWloP76pskXDTDdaKBqK++hBIrtES2Aj4biwhJZwvQBCfGHm+CQJbRQm910xz5Nbv0BQ9t1hnJv18P8w2Syh7TMsrY2tV66OPNqVONduQYf1J9FXNZnBRkpGRV7luGgnK18UPwIvWxhdUoOPO2YmI7BqP1N05v8W0iXS1kbk7OcBhh9664U8XfsM6rhSUl2VsOzkBZ0E6bdRSS8qTRtjhpCaU8dxxzne478tSJ8SZzvOZpeHfBBB9SWxHeBYR44VgZeC5/uZtkZigIa6vB8XIu2FyNa8OwnyvzHoDxb8g5DTMMg945BkIowvwJHVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fujitsu.com; dmarc=pass action=none header.from=fujitsu.com; dkim=pass header.d=fujitsu.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.onmicrosoft.com; s=selector2-fujitsu-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dF0GoSKOgWBvIwsNV3121n3vXOSj5NzFsxONJyY8Jcw=; b=EJv3Cbtv3iflX2g66xo1KNZCF7R7VNTScoYT3IOByxzDb04ADxsKf1ca2jwEdmtQGislMac0czOUSslAHaWQ23HDsqJnXUZ1bGWgtefrC7xmJlYk1cMaEVFKXhXAIz7EJHbUL+cUaCR+NFpk3MHF/b+u5u0dHfzmvFjBnMTZAeY= Received: from TYWPR01MB9311.jpnprd01.prod.outlook.com (2603:1096:400:1a1::13) by TYAPR01MB2861.jpnprd01.prod.outlook.com (2603:1096:404:88::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Thu, 30 Jun 2022 02:38:12 +0000 Received: from TYWPR01MB9311.jpnprd01.prod.outlook.com ([fe80::f807:7dd5:3c46:bd7f]) by TYWPR01MB9311.jpnprd01.prod.outlook.com ([fe80::f807:7dd5:3c46:bd7f%6]) with mapi id 15.20.5395.014; Thu, 30 Jun 2022 02:38:12 +0000 From: "lizhijian@fujitsu.com" To: "James E.J. Bottomley" , "Martin K. Petersen" , "linux-scsi@vger.kernel.org" CC: "linux-kernel@vger.kernel.org" , "lizhijian@fujitsu.com" , Finn Thain Subject: [PATCH] scsi: Shorten too long warning messages Thread-Topic: [PATCH] scsi: Shorten too long warning messages Thread-Index: AQHYjCpwIxGIEp86UEykMwcVyHAQBQ== Date: Thu, 30 Jun 2022 02:38:11 +0000 Message-ID: <20220630024516.1571209-1-lizhijian@fujitsu.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.31.1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fujitsu.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5cd61354-1239-4535-a235-08da5a419372 x-ms-traffictypediagnostic: TYAPR01MB2861:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: W97mFIoZ/Yb/2vmTEs0RTULqu1kSxCAvxSRH3SSdhUrCAAaqWZEML2edA+pweIR6OIxRzBhhVPocCat9oOF7bFZxCY3TiBCBpNoKI1MDWwH6hQC1jnL80nRSgyFQy/PwgKK6YWzNKSQKwx/1SHhCQuPf8WkchIeodl0j1YP44bwddJpCon1Bg4niROkF3iqy0Ze7kZ1R95E/2Q9GeyyGwgAa98hxUG3KqeViEo+WzC+zQR9eUPBKq/E2/AbKSMsos9O5c/A0dxSn9h8q6/deAkn8GZaIu6uelAFqlZ1kwUHVIvfEAfPM/IZjvDnDZxFkIhIrC7V+z9bFEnhATRNEzSJqMIxf0o0FnvwB8dm6oIuAYRc6Dbvp9ZvmbuI+u7WlPZkEm4irTzaqV/dkvwezvoaV6/FGZ1rW+R5xjSOBA2b1kh+Q1XHPMqP9U7nHYjEqMUE1fB+8WbX3xXxHPQvKCK/nC2Tg6Ev1EBOsCTNszKyGN+i6P1GV8qwyDkZhqLASi3u/hT5O7K2rFndIoggM9kMZ3PX6ueLhFplF6UEto4njmN9B6LPGig0C+efwxefcPOXtUzUWviSxTh315RLa3DpmYXURMwlNVSM+Az6oHyg6VGrPAsLeOMYrL9WEshAZosxRIBsJVLMC8j5nN5ogl+Y+y4LICdcuZ3XlnfhXqYAPFuN1IX3pGtjefiChH3ZxkcI4r/KboZINpZRJelJq1ji8XCdUZN6z/qKWmTB/ojyw8UP6xm4bmyC1kR4/aDv81DJ2OMZaRWd4sulpHOcXP+8BVCrpo7B8rNXTT4xMsO+IIi2gETjw7PpZ6MwWJi4b x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYWPR01MB9311.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(39860400002)(136003)(376002)(366004)(396003)(64756008)(2906002)(38100700002)(4326008)(6512007)(85182001)(15650500001)(8676002)(66476007)(54906003)(316002)(110136005)(8936002)(66446008)(86362001)(5660300002)(122000001)(66556008)(6506007)(83380400001)(91956017)(82960400001)(26005)(38070700005)(71200400001)(76116006)(6486002)(66946007)(2616005)(36756003)(478600001)(41300700001)(1076003)(186003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?bm1SWTIrcXZ5bFRUbWgvUkh2?= =?eucgb2312_cn?b?a1VldWcvYkUyREJBL3kvYlJXTTF3QlB6S0JZakhHcXUrZEg1Sm5ZdXdTSXdrYk5j?= =?eucgb2312_cn?b?N212aUl3UmhBSXJyMDVaeG5veENGbVZCcDUxSnVPN21yeHRWbkJkVDAxSTFTSURT?= =?eucgb2312_cn?b?RDl1cXNGdGJEdE8zL3BaNGk0amNKUnp4Z2QwTHczc1MvVVhJZnNLcnQrbXhpaTFq?= =?eucgb2312_cn?b?T2tOb1Y0RHRZK3BFSXEwcWllMVMrWm9WM2xHNWNReHRubmxHckpkYXVFVlA5ZTMv?= =?eucgb2312_cn?b?a1Vxb1FFWk9zcGZsV0hxenpxZnkxVUxIM2JyNE4vSUcwTXVVQ3dkajZ3Wkc2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?b?dEtNdUJIaGhiUWdiRjQwMzUrTVlrOWY0OTBiSlZnV2h5OUUwT3IxSlp4bGIzTGs4?= =?eucgb2312_cn?b?Z0Y3WWhSYUNkcWdZenhrSGp4eEQxRWNIRmNaRTFvWWw5cEVOb25wQW9Mc3N6Vzc4?= =?eucgb2312_cn?b?RlpkSnVtVUd5VmlKQnBQNXlxekE9PQ==?= MIME-Version: 1.0 X-OriginatorOrg: fujitsu.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TYWPR01MB9311.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cd61354-1239-4535-a235-08da5a419372 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2022 02:38:11.9327 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a19f121d-81e1-4858-a9d8-736e267fd4c7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: dze64WvD5Z0XH+roRApf+QA9CvZMk1cAuAypzHER69XhdnfikwCFJ0qcvmmlOQh/CJBF2AjriM21maEY4M6DpA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB2861 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org sdev_printk will only accept messages less than 128 bytes. So shorten the messages exceeding 128 bytes avoid getting a incomplete sentence like: [ 475.156955] sd 9:0:0:0: Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatical Suggested-by: Finn Thain Signed-off-by: Li Zhijian Reviewed-by: Bart Van Assche --- V2: update patch as suggested by Finn and upadte the subject correspondingly --- drivers/scsi/scsi_error.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 49ef864df581..947d98a0565f 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -463,14 +463,12 @@ static void scsi_report_sense(struct scsi_device *sdev, evt_type = SDEV_EVT_LUN_CHANGE_REPORTED; scsi_report_lun_change(sdev); sdev_printk(KERN_WARNING, sdev, - "Warning! Received an indication that the " "LUN assignments on this target have " "changed. The Linux SCSI layer does not " "automatically remap LUN assignments.\n"); } else if (sshdr->asc == 0x3f) sdev_printk(KERN_WARNING, sdev, - "Warning! Received an indication that the " - "operating parameters on this target have " + "Operating parameters on this target have " "changed. The Linux SCSI layer does not " "automatically adjust these parameters.\n");