From patchwork Tue Oct 18 18:16:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bean Huo X-Patchwork-Id: 301 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2097731wrs; Tue, 18 Oct 2022 11:19:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM60wdULbN2LJC8zeuGQL3mqfwEC9i27URLM8WdPHhGDuJZowYVdlIiEpWINavEyDUZa1cd8 X-Received: by 2002:a63:fa4f:0:b0:438:e26d:5ec with SMTP id g15-20020a63fa4f000000b00438e26d05ecmr3728889pgk.361.1666117164590; Tue, 18 Oct 2022 11:19:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666117164; cv=none; d=google.com; s=arc-20160816; b=yy7rt4KVwP+g4qWCKA5+ysOMK7A8wVgbuYzL23ZFM5HQwQN3p1JtxDNPki05vgM1OB rWPbAe+G7g7/m+P0bdvFgec7ccDafNlQuaGYCB/+GVSB2MAgp65FbFvWdlMZQzb+P1px WlNZy+M6L7/pOLza7mmEvUOs1qduLrgLkmbNJYSTabFmhEHjt/HjgVBwR1YyugdPFiM1 afPM+stMSAjMopoYq1hc47x4kCJ/DsfXetTnq0cMZEVOfZqj0A6RAdWUOZ8o5IRpZl9G xZPDGKI+V0BzRNa92wau664mVC8r7pmD3iuYljLT3idG6LktqYJiBzavJ9XaXWFEXu8Z xVzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rC125LhrzcYLeAaz+7xLGt5TDzCO2tDpbxIYa+6CZ+Q=; b=M6e397u3W0fvqQBfyGGMWYEhBOF0fNzO9T5vnIvDHqRm3ogeOLTl8TOlnWYxgsnOyP WxMZgpGlnA93//8op5LW5rXxQE5oqRjks5j/FtTq4+mYDS9BJvBdLQ9iYqaCqtbBc6ii IzOc1FWCI0NWU4ffD6tFf4/pkYF0Jl3kTa5YQjud8+pL7zxGlqSnlsO5BCGSzrOqMasW RUAcuElqBkQmvfm0HIXd1bpRVvGYVtR3OjQCxURInSEQBAC68MRJFQk+hkd6xV4Rt+PC MY+Oa5QPNmC5kpbLCFZStbUplvFIE8G5RbjP+3L0oGAsBWNxhSZHUGGAUF7TBQuLN1oN 8wUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@iokpp.de header.s=strato-dkim-0002 header.b=dUVBq4EW; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i6-20020a17090ad34600b001fd81d07d0esi14447204pjx.123.2022.10.18.11.19.11; Tue, 18 Oct 2022 11:19:24 -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=pass header.i=@iokpp.de header.s=strato-dkim-0002 header.b=dUVBq4EW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230082AbiJRSQ5 (ORCPT + 99 others); Tue, 18 Oct 2022 14:16:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbiJRSQr (ORCPT ); Tue, 18 Oct 2022 14:16:47 -0400 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [81.169.146.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12DF37D1FF; Tue, 18 Oct 2022 11:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1666116998; s=strato-dkim-0002; d=iokpp.de; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=rC125LhrzcYLeAaz+7xLGt5TDzCO2tDpbxIYa+6CZ+Q=; b=dUVBq4EWp7FElp68G5ubEHHU6vq7VSWGoRKg22Z3+nqAZ5DVhb361VMPwLbrgCzLA+ LD/GIjFVBdhKL7xVyCt3q/7GLptm4+mRf52hkjwye8pJyu8vQtjRRptFkKJ/wPFdqIkd XhzU7Q29prm03Y7nO4Fj/vBqlDx+7TfPIdQxKUGbAbEoxnY7r+dNekLpHXEE+sTUN0H9 XxNqCXDJMARatumuPcSN3MCkKIHR8nfHeqt9eHsq3HS3QSKvTPGCWMqsh5rNvvvhCUs5 C4rh5NLtOC1b8em//4mVWvp7S6zZrZmpGaORLYF8Mjzfy8wL6BJMFQ4YLD52H4EJh2da VG3w== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":LmkFe0i9dN8c2t4QQyGBB/NDXvjDB6pBSedrgBzPc9DUyubU4DD2QzemV2tdlNlNRZBXiUw=" X-RZG-CLASS-ID: mo00 Received: from linux.micron.com by smtp.strato.de (RZmta 48.2.0 AUTH) with ESMTPSA id zad98cy9IIGZYSS (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 18 Oct 2022 20:16:35 +0200 (CEST) From: Bean Huo To: alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, bvanassche@acm.org, tomas.winkler@intel.com, cang@codeaurora.org, daejun7.park@samsung.com, huobean@gmail.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 0/3] Changes for ufshcd.c Date: Tue, 18 Oct 2022 20:16:24 +0200 Message-Id: <20221018181627.326657-1-beanhuo@iokpp.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747050472009168196?= X-GMAIL-MSGID: =?utf-8?q?1747050472009168196?= From: Bean Huo v2--v3: 1. Add patch 3/3 2. Add remove unused parameter param_offset in patch 1/3 based on Daejun's comment 3. Further optimized patch 2/3 based on Bart's comment v1--v2: 1. change in ufshcd_lu_init() in patch 2/2: 1) Remove duplicate parameter initialization 2) Move lun parameter initialization before kmalloc() Bean Huo (3): scsi: ufs: core: Remove unnecessary if statement scsi: ufs: core: Cleanup ufshcd_slave_alloc() scsi: ufs: core: Use is_visible to control UFS unit descriptor sysfs nodes drivers/ufs/core/ufs-sysfs.c | 21 ++++- drivers/ufs/core/ufshcd-priv.h | 6 +- drivers/ufs/core/ufshcd.c | 155 ++++++++++++--------------------- 3 files changed, 77 insertions(+), 105 deletions(-)