Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp364767ybm; Thu, 28 May 2020 05:00:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqcI5K/ywGlh9IhHa9jzICEbioVM/XVGClSAAeyDWd/wnA+AslhNyOUyR+BHq8zVzqsyty X-Received: by 2002:a17:906:13ca:: with SMTP id g10mr2633095ejc.433.1590667201175; Thu, 28 May 2020 05:00:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590667201; cv=none; d=google.com; s=arc-20160816; b=PZO5i0Z1RXdwfImCEgZ4vBKHWmjCrM2a6FqMcdWjrNkF+1gbq9wNsB7k5+RygYlG7V fqDP5a18iqczsFB6K4qRKEe97Wd0gjkwbVmluci7a4vOTRuEhzWcVy0aXrYJJ0MjnP7G RL7If0bXc6LB0RV5a75NbBxwfd1FFfF2pKZFykwIbDLZkDdW6YRaVeZkHRRxs67cZou+ Ra+fayPEbgFf4wecOlueXVpgGUBDlpNLHbub4xeeZIK8XJP9B8xNpfZ2TwUAByvqAS5v 7v+sbQD1CxzUXhF2JkHE0A0ddpBxbBt9qP+eOc96WrobbGR+dprR+tp1JYjDDZ0z4E8U DLxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=VqNPYxcU61E3GnlH8hcaNPEopADGrQrIHtoRm3vT2B0=; b=yE3euLCprP3jgKRgD2SmN+Jp77XTEXUR34UdV69m3oeOTLwFgsEqT9YoHWp/J96+zQ F3nztue8znzSi5+XdxTcZbT6CNAcJgMu7mfDtUdmoMFnf/c+aKiVLcFTtm+qfAAkLwTg y9SJ+NLEl0dkYO+1LpqI1SIAcnh6RAwZwaMbogB1DCaWNDdF2ge/qW23e/pSSQ2kOtxo IFcPIa5DRfrvKDqde9oCV3NQR9+iFHD/yXWPWCEi9PerI9PYQFClefRmJ1Lz4wHP8Pe/ 4K+zDkAkIOwnhHggXh5BVb4Ow3jeVSzxQKYLDJ8I5y9Lh6UtSQEibgepU0b4zq4JZufw i28A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LTw1j5U9; 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 i26si3861311ejy.176.2020.05.28.04.59.37; Thu, 28 May 2020 05:00:01 -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=LTw1j5U9; 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 S2388920AbgE1L5F (ORCPT + 99 others); Thu, 28 May 2020 07:57:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388797AbgE1L4l (ORCPT ); Thu, 28 May 2020 07:56:41 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19E14C05BD1E; Thu, 28 May 2020 04:56:41 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id j10so11989546wrw.8; Thu, 28 May 2020 04:56:41 -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:in-reply-to:references; bh=VqNPYxcU61E3GnlH8hcaNPEopADGrQrIHtoRm3vT2B0=; b=LTw1j5U9ak1ZTUN5UhfX6jsE6PRvPnyDu+bHcns9ELHJw/EJNA3juKzE342NAOD2aS r1CT2AYX356oH1TS0g/Pp0JId88gR6yuYstCrnAEzYxnGm3p+F2WT+8vv9Y5iayeje+r L48cRbhxn4Y6Z2ZY8AqjIQgKrGDe63xBAoH6cgrH3Mda9JUaStZ2CULvnbwYAATYOzzu L+Js6tXikhT8vielmdjEbfLJgrUNx3cRxAho5q0R2hUDa0+khVd2mii1sEAsV5bfdk8b vA6xFV5nFF3QHmo38cZ/T65/zcY1A0BHfcIZDBeOoUxW5H6DyKCBOE3JJGJo8cjc+NNv ag7w== 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:in-reply-to :references; bh=VqNPYxcU61E3GnlH8hcaNPEopADGrQrIHtoRm3vT2B0=; b=LXnTETb1thjq47XCeTCuYNoJFwmW69+OXVY1jrQqgewwsyR8GM6u7cJR+0MkRJdD1n D3jkaXUp1EDaxUOnJyPa0DU/xgK9ZEVBmezU/eI0DVXTnwiFFUDjr3N/hsc3IXrfeDIZ 5KETy3ZYorW+wxCmS92BUV4gz5pv/htDZ2sHQ0m2hYQzsXRlE4W1gUjalIyenoRZcyNU 1tw0o17ZMC0shIj6EMjrPJKH7/70Pu2oIAeZuHjY0TwVI9iPm2j6dJ8rYc8DX0z5W0HK Bv9Odhn0Y1ctA4zdDv289k2iNlWoyaO0ryP4lgdgX4OqGkuvVDWTxP9o5Wk8HYPQYRMj Fhhw== X-Gm-Message-State: AOAM531QEQDaiJ9yAeTlFVyjXL2S6HozDFAAEjewqUKquAAW+PxWdWhe ibBjNb+po9+i//RDGDfFFTM= X-Received: by 2002:adf:82f8:: with SMTP id 111mr578870wrc.257.1590666999891; Thu, 28 May 2020 04:56:39 -0700 (PDT) Received: from ubuntu-laptop.micron.com ([165.225.203.62]) by smtp.gmail.com with ESMTPSA id y37sm6589178wrd.55.2020.05.28.04.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 04:56:38 -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 Subject: [PATCH v2 1/3] scsi: ufs: remove max_t in ufs_get_device_desc Date: Thu, 28 May 2020 13:56:14 +0200 Message-Id: <20200528115616.9949-2-huobean@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200528115616.9949-1-huobean@gmail.com> References: <20200528115616.9949-1-huobean@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bean Huo For the UFS device, the maximum descriptor size is 255, max_t called in ufs_get_device_desc() is useless. Signed-off-by: Bean Huo --- drivers/scsi/ufs/ufshcd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index aca50ed39844..0f8c7e05df29 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6881,8 +6881,7 @@ static int ufs_get_device_desc(struct ufs_hba *hba) u8 *desc_buf; struct ufs_dev_info *dev_info = &hba->dev_info; - buff_len = max_t(size_t, hba->desc_size.dev_desc, - QUERY_DESC_MAX_SIZE + 1); + buff_len = QUERY_DESC_MAX_SIZE + 1; desc_buf = kmalloc(buff_len, GFP_KERNEL); if (!desc_buf) { err = -ENOMEM; -- 2.17.1