Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1927rwi; Wed, 2 Nov 2022 08:41:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7BDQLS9IZ2ym0nHpqDvXcHTLX5ghYF3IFgPRxrK5040/0O9oqkNjNjtcaPYzJ6kE4XOUTv X-Received: by 2002:a17:902:ced2:b0:187:1dda:6897 with SMTP id d18-20020a170902ced200b001871dda6897mr17468344plg.83.1667403713012; Wed, 02 Nov 2022 08:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667403713; cv=none; d=google.com; s=arc-20160816; b=djBMH2sHaT4OLS7pplri1NAfYZE5ADyI3jqK6wsntmEHHRfyTYMYZqKDwR80StMliu S4tD7rNokxkMVxZBeFM1kRGnVMmCBXGS1CNQ6o70MjdYtox+6FhVEVGn4U8erkBI+o2L u2iJjcc12/OIlmWWi5b3T9kukOj0dV2p9FquW3lQjtewywocheNBWW2h+A8genMT7g5b oiTB9wLcHKH4I/JKuT2+sItRXbmfcrnjZrSczPRJaZ1WrwM3V28bujMPRmfdDucG4P3/ O5Jn4E8yDCJrgmTch0sVLWFABCsNP1q490IOAimAIUxAOvPXeQmzKpJ0si9lBGFkIgVQ HyWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :wdcironportexception:ironport-sdr:ironport-sdr:dkim-signature; bh=wI7DHF2E9lrSW5Ohxbhayx/akZLdAyXP8/N+9/xGPrw=; b=LUmGmaJcPIWVYfMGxksKXc4RY1c1gSMDZJtlVsRv+KHFiFHYD+/JeQzNWGSC9L478Z t9d5gNPvhO+plQiWKSDaBum84ZG1DKdrwgI5IbluKqp5+ZPoCHU8gjyqzMafcA4K/HkI ceuFcUX0qs7/mGUY6uUiLZx3V8kZ1ya7q88OBzHucY19oOmK+O3Gv0rxQlLBzjRexP9E MNBeN9nwKuv1IGbzZ2GNkJsHEQ9Ze/vcoteld7pQCkEdyp5aW7KjXnp0ZZCCK+FFuLDw Nj7P7PQGa9plhG+x0xhHOvm1ITAnFAZ6A5vxgKRUt6WcPo8v9OSr1BSpveHe2rk8Zp1k l3mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=pG9Ihfjd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u10-20020a056a00098a00b00554f1b32131si18298652pfg.362.2022.11.02.08.41.36; Wed, 02 Nov 2022 08:41:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=pG9Ihfjd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231654AbiKBOaJ (ORCPT + 98 others); Wed, 2 Nov 2022 10:30:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229934AbiKBO3x (ORCPT ); Wed, 2 Nov 2022 10:29:53 -0400 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9A202B19B; Wed, 2 Nov 2022 07:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1667399383; x=1698935383; h=from:to:cc:subject:date:message-id; bh=5kjv+Eofbg6EEagVUtsebL/TmswxuzBGGl0iDd2sZaI=; b=pG9IhfjdUGXQ/kxaYNXNNCTowoMJc/6SlcWoZIzX8FuHdr0x4VPpFRiq Gz6Zu+InqnMsfHcnjgf0+PUs2NpQRRYDrPni8iU3dUXy0mM0iOBc4Po9W vuazxSMNEKNQ/ZSemE0MdKkiWio+95pyr4qUV9LQ/dO1EZZrTdERj4ubm 6uH+lddcny2ITC2l4vo/bnjzFHw9v9EjAXZP8XRSV4PBzHRiCUyZGUF2a CVKm6LPn7niBJbpsW0yswPOOiFV33dWbcbs0ZZqUNA5EMFg8xZVGA74BW kK7vDe/OOAoETyg788IvH7/ASyLrsJtAmhufUuQHeJY/e2ysnDtHmH7Ue w==; X-IronPort-AV: E=Sophos;i="5.95,234,1661788800"; d="scan'208";a="213607169" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 02 Nov 2022 22:29:42 +0800 IronPort-SDR: Glrt0U51kRzVgTuIg9Q//0eWCWoMRntqizlxRbx5yGtwL+sUmPMUlVbSunUBhSguG+lNbmbp09 RScG+S01WZnc57VjGWcBGgQm0k/5NcD/WF3+n9Zvi5LxbSlw5smqEtZa7+/OQ0nsYPyr4INE4V eGcgoS5tsAsV3wBOzxA7vDrANdDy/cagTBrNQgjSa3RkXrdby6ODrA8sOfK5/hkuAvaKi6Wj8l URa1eW2b9lE3QM4X+/NPjxAIDFEu00GuUT68dLd+JcibIu3fTcnSwWOCHtVDAMtagWTMzlJvtw GcE= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 02 Nov 2022 06:48:55 -0700 IronPort-SDR: uESj0/LdP+QqMomig9AN2xK4/BAuRV24flBO2w+o8d+h7ehzW6FX/ZKSCN5AmpyJAA1Qm+7xDb PKCTiPPhLyYbzDAVjgQL91Q9Mj/EJFipeViB2Yuy4oYb9ojbPJ/bua8QvWlSPS3HXt97S2eHvC fXkPtzPIVp2Y7yM2kCynTVGzxP9w7WUmibI+K+yTclW3zA0efmvSN/hKz78NqwoEbxBN6hueHt pDpBmvIoyEpWVbURqGWp8+Y+oBj3LH/fVB2CJOxWCYJ0uh2jEForLKk2h+UOAT96LNHOnrwf9Q uss= WDCIronportException: Internal Received: from ilb001078.ad.shared (HELO ilb001078.sdcorp.global.sandisk.com) ([10.45.31.219]) by uls-op-cesaip01.wdc.com with ESMTP; 02 Nov 2022 07:29:40 -0700 From: Arthur Simchaev To: martin.petersen@oracle.com Cc: beanhuo@micron.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Arthur Simchaev Subject: [PATCH v2 0/4] ufs: core: Always read the descriptors with max length Date: Wed, 2 Nov 2022 16:29:09 +0200 Message-Id: <1667399353-10228-1-git-send-email-Arthur.Simchaev@wdc.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v1--v2: Fix argument warning in ufshpb.c Read any descriptor with a maximum size of QUERY_DESC_MAX_SIZE. According to the spec the device rerurns the actual size. Thus can improve code readability and save CPU cycles. While at it, cleanup few leftovers around the descriptor size parameter. Suggested-by: Bean Huo Arthur Simchaev (4): ufs:core: Remove redundant wb check ufs:core: Remove redundant desc_size variable from hba ufs: core: Remove len parameter from ufshcd_set_active_icc_lvl ufs: core: Remove ufshcd_map_desc_id_to_length function drivers/ufs/core/ufs_bsg.c | 7 +-- drivers/ufs/core/ufshcd-priv.h | 3 -- drivers/ufs/core/ufshcd.c | 100 ++++++++++------------------------------- drivers/ufs/core/ufshpb.c | 5 +-- include/ufs/ufshcd.h | 1 - 5 files changed, 26 insertions(+), 90 deletions(-) -- 2.7.4