Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp349335ybg; Wed, 3 Jun 2020 02:22:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws7HOQK6DK6VAwHe0EOUTICpEgbbcnaWjChQt4l1dHPVuVgTurOKWjQZH93LOYg2/rrkck X-Received: by 2002:aa7:dace:: with SMTP id x14mr17459348eds.343.1591176174204; Wed, 03 Jun 2020 02:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591176174; cv=none; d=google.com; s=arc-20160816; b=DfJ2FIssMy33x2hXNj12M4GnQPqh+9DBSpmhk1ELcAMxY9se1M/CbDLiB3C2gCZkJa Ysf3FTyll9sNGWHs7hTYN2396WWueVT1fZ1AcaRnHy3di9rVgac3XqHZ+exM3TKr7Yt6 KbAtHtlQ8wowTxv85iHI5DWToONG/EFAxvYHeIOb8NIVfizGRqGCXjXp/uUhtKu6DnHZ 8ER5PO74KA5PzkojK8ZMvzg4K5hW399w/NSda0IWmaHSQdThysjoNw/iL/0k/h7ekoKP y9dm8BBQ8LME91kcR1rUK2LZDMsjMA361u6pNifw2ZvaNBR+T4riILsS3NBKcD+pNGcb elFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=3DI0t3OHBLadpo7QorIFcufLBAcgTKa7K38eRTU2zac=; b=jAYFkLVI5+sR2SEetxD2oHGUY65Tm0Ud9E5r7fjG4WOrKHAz8kj9W3zSE6WbC7RShN 3MP0NPN/jS4FbwCwSIaiqhEkMqpcI3VrY6ZC48YoMU9qq+SZnuDDs/LoYBelPPh02wvt XUWDz9VNpfuDvADQDdq6gQr5qsY0bYYAkchBCDts2ek2kKarnm0hJQ6uwKgo6+CxYnkE 4+N7Rp3afgOsfj7cYupzR29eQmI0xWE8nlj7QbamrTMAFW121YP9BGeojZK2dMi746n7 BPbBJPZ9EkTpFNQzDFOfHx/67trnGxzeYhEb8Ydn5TiyRmNkB7Z26P5NAl1qu21Jh9o+ uAvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rrcWDFPO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si808793ejx.646.2020.06.03.02.22.30; Wed, 03 Jun 2020 02:22:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rrcWDFPO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726482AbgFCJUQ (ORCPT + 99 others); Wed, 3 Jun 2020 05:20:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbgFCJUP (ORCPT ); Wed, 3 Jun 2020 05:20:15 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DF5FC05BD43; Wed, 3 Jun 2020 02:20:15 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id x1so1377794ejd.8; Wed, 03 Jun 2020 02:20:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3DI0t3OHBLadpo7QorIFcufLBAcgTKa7K38eRTU2zac=; b=rrcWDFPOBajLO3DBatyL3qv6TP2l1qbGg53b4iPYWVbAUXDyOAt05D+PU1XoSK+NZT O0wZB/qgo+ig/Y7wYxOqFMe6eIzNN+6wY0NwZL9PSBPtNliQThtRV7/uOPmqhyHZHFmg JS/eGy8OVDzU0whCYe977jIIS2z96Fyr+1gHPYtPnNSbqdGsdpXl0RwIurkLWpHR2RGg AbSJ1NdQOWgC8tOvMGtonn1+6/4cFXM9s1lPO5iTA8r3xWf5aWXHUPHBEWDHeIj874y4 342uTHhjKIFP7fmnPHhUml7WOP9JL1icZeN56mqCloxkRbrYaDn6wZ7/LNTXowh3o5BZ 07GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3DI0t3OHBLadpo7QorIFcufLBAcgTKa7K38eRTU2zac=; b=XDHIYugpXCkvtWCHwnXJhnyDmdBIrxW7CGeuKxfmUULhXzea2Zcyv2sUnCHyl5fyIr bYynWVLVgAvB+Hvql12Z5XbfJfx3Sk5AOmolaJQQQP3U4+XjH7FPAkuZfvC43HsGl8ul cjbfsDDuUffvv3WHwsrwRuyuyijVV60ZquwYvmP0+BLQ0cZJSZU2EPjswOaPa7LFuIK3 KX8rvhtP4Gdj57LZLTAg0Zz9S1rQZmYLXvSeZqn9D8SbeuhNIGv/fpLcZr75kQwBJYO6 TQdRp/vKUhrsp1Lgn+hP+Oi2GqygfRXWqhh1L41JpKathL3Dzf/M+hG3lGjihFDj69e7 EvXg== X-Gm-Message-State: AOAM530wyF5iTCNoov62CB6zQF1tx0nPtbe/jOzv1t/YsMnXNgsPpcrb WmqfZ2k7bgRk/2+SOoeNlL8= X-Received: by 2002:a17:906:a458:: with SMTP id cb24mr12743050ejb.5.1591176014067; Wed, 03 Jun 2020 02:20:14 -0700 (PDT) Received: from localhost.localdomain ([2a01:598:d00c:464c:92b:aecc:3637:dc7c]) by smtp.gmail.com with ESMTPSA id 64sm865636eda.85.2020.06.03.02.20.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 02:20:13 -0700 (PDT) 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 Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, beanhuo@outlook.com Subject: [RESENT PATCH v5 0/5] scsi: ufs: cleanup ufs initialization Date: Wed, 3 Jun 2020 11:19:54 +0200 Message-Id: <20200603091959.27618-1-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo Resent this patchset since linux-scsi@vger.kernel.org and linux-kernel@vger.kernel.org rejected my email Cleanup UFS descriptor length initialization, and delete some unnecessary code. Changelog: v4 - v5: 1. Rebased patch 2. In the patch 3/5, change "param_size > buff_len" to "(param_offset + param_size) > buff_len" v3 - v4: 1. add desc_id >= QUERY_DESC_IDN_MAX check in patch 4/5 (Avri Altman) 2. update buff_len to hold the true descriptor size in 4/5 (Avri Altman) 3. add new patch 3/5 v2 - v3: 1. Fix typo in the commit message (Avri Altman & Bart van Assche) 2. Delete ufshcd_init_desc_sizes() in patch 3/4 (Stanley Chu) 3. Remove max_t() and buff_len in patch 1/4 (Bart van Assche) 4. Add patch 4/4 to compatable with 3.1 UFS unit descriptor length v1 - v2: 1. split patch 2. fix one compiling WARNING (Reported-by: kbuild test robot ) Bart van Assche (1): scsi: ufs: remove max_t in ufs_get_device_desc Bean Huo (4): scsi: ufs: delete ufshcd_read_desc() scsi: ufs: fix potential access NULL pointer while memcpy scsi: ufs: cleanup ufs initialization path scsi: ufs: add compatibility with 3.1 UFS unit descriptor length drivers/scsi/ufs/ufs.h | 11 +- drivers/scsi/ufs/ufs_bsg.c | 5 +- drivers/scsi/ufs/ufshcd.c | 207 +++++++++---------------------------- drivers/scsi/ufs/ufshcd.h | 16 +-- 4 files changed, 54 insertions(+), 185 deletions(-) -- 2.17.1