Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3305300pxa; Sat, 8 Aug 2020 17:32:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqI9UedpU9I+5+h9kh7OGZr1fepmaJzEclXWI/5WB2XfUYJNKMYw+KwZ8fGcMj4OxEoBOs X-Received: by 2002:a17:907:100f:: with SMTP id ox15mr16572873ejb.125.1596933153604; Sat, 08 Aug 2020 17:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596933153; cv=none; d=google.com; s=arc-20160816; b=EGVMZGn03/tLL5nfovbC5geYVmZR6uQRja3OBAew2/bKQ2sQjbw62Rn1YHyEYKBySf A7M7VLIyjhQiUwoluGvht4c6VZa77akdvlx+1qeWw3v8EFpMlU1Myax3JCDm7TxwqxfB caAu4zBE7wAFndIb6vVEV2Vf/TntLLwM7/ASRjcdqykCjpaRtWe47tsT8UAiGiNUTTnC FM9HXbeFdY60I45JEXQhmcEDfDjC0TZY/Xbv8Yj7Ih8MfIaEbydYqoteT0fiHxvIC+Z6 d1skBUYjkjsmliOi4U3q5vYFM0WwcYwENNm3LTnohQY9kGvbVlIiP17iH6tqQkJVka2E bWyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=k0Q617GOOxsvAC/qWphQFDLOhIM15Suvk09+e7APeMc=; b=kqyQReyN+9UXHwGHV7GfOMjZw6CzGAW14o17nkZVcLmBADZHfYThQFMnx1gX5c/7qj nPTf55bjSbcp5lW797/yHcORrfLuGFpodExDILWyba1MWiC+ILH3Dw/kkNgLFTmeMLUu u+uffxjhI4NaUVE5Pbm/h2jD83/GOYkN5Bwwhu4Y05Olh80sGfBkQziIaxHIZ6roR6/k DvHW8nD2ny2PLHyB6oCFT+zXdB6oRsgDQjpGdLwPnldqwrjJkH339aqCFTJPruwYUH54 /QIbSMthMw8Fzs/1LLTvbvql0hFpPMjyytO0OSNcKhMpTVRJnWUEolewmSrLxPOOMgyb Ibqg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si4031774edw.5.2020.08.08.17.31.55; Sat, 08 Aug 2020 17:32:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726120AbgHIA3b (ORCPT + 99 others); Sat, 8 Aug 2020 20:29:31 -0400 Received: from mail-pj1-f66.google.com ([209.85.216.66]:37372 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbgHIA3a (ORCPT ); Sat, 8 Aug 2020 20:29:30 -0400 Received: by mail-pj1-f66.google.com with SMTP id mw10so2929904pjb.2; Sat, 08 Aug 2020 17:29:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=k0Q617GOOxsvAC/qWphQFDLOhIM15Suvk09+e7APeMc=; b=Ny8iCLmLvYqXA2Qh5ci/RKuSMJ6yN/taSI5CJtQ7EJGx2nNDYCfNLfX4OwacV+Ay91 k1Mt4EOP/Gp7xETdRvwiLuspjA4Le7bLpvE0Dx4VYUfz1ch+BEQ/21tILUno5dipGSZg eykIOwReCno6T8xf3uLh1fz0Fh/hqGbXjusSjAQkiHKieHELiMgUGxOvhw1bDedec26r Z7XNFXfRZ5xVkuWynaYpxCMwlO8krSwlZMKScG96CjFqepUX1TA6DE2lzJuYXkQF4HqZ dLLAqFggICl2boxBfnXM0UTCwgyN51jkvhQCRvZlloMbfkVqo8sQU3srbGgoUwIEfpM0 Q88Q== X-Gm-Message-State: AOAM5325TzTzYw66ReMUj4FoPNuEfgDvQYGXPNhFdwW620V6Lqmkx4BR xEYjG0dJKVvKO/JmRxWOOJo= X-Received: by 2002:a17:902:900b:: with SMTP id a11mr18140800plp.315.1596932969668; Sat, 08 Aug 2020 17:29:29 -0700 (PDT) Received: from [192.168.3.217] (c-73-241-217-19.hsd1.ca.comcast.net. [73.241.217.19]) by smtp.gmail.com with ESMTPSA id f195sm17756723pfa.96.2020.08.08.17.29.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 08 Aug 2020 17:29:28 -0700 (PDT) Subject: Re: [PATCH v8 3/4] scsi: ufs: L2P map management for HPB read To: daejun7.park@samsung.com, "avri.altman@wdc.com" , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "tomas.winkler@intel.com" , ALIM AKHTAR Cc: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sang-yoon Oh , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , Adel Choi , BoRam Shin References: <231786897.01596705302142.JavaMail.epsvc@epcpadp1> <231786897.01596705001840.JavaMail.epsvc@epcpadp1> <231786897.01596704281715.JavaMail.epsvc@epcpadp2> <336371513.41596705485601.JavaMail.epsvc@epcpadp2> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sI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++w1mLeRUvda3i4/U8wDT3SWuHcB3DWlcppECLkAEQEAAYkBHwQYAQIACQUCVI67igIbDAAK CRBxXD01xc4QCZ4dB/0QrnEasxjM0PGeXK5hcZMT9Eo998alUfn5XU0RQDYdwp6/kMEXMdmT oH0F0xB3SQ8WVSXA9rrc4EBvZruWQ+5/zjVrhhfUAx12CzL4oQ9Ro2k45daYaonKTANYG22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: <86a04d4f-bb6f-9bc8-cb64-a50b0ed2fdb7@acm.org> Date: Sat, 8 Aug 2020 17:29:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <336371513.41596705485601.JavaMail.epsvc@epcpadp2> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-08-06 02:15, Daejun Park wrote: > + req->end_io_data = (void *)map_req; Please leave the (void *) cast out since explicit casts from a non-void to a void pointer are not necessary in C. > +static inline struct > +ufshpb_rsp_field *ufshpb_get_hpb_rsp(struct ufshcd_lrb *lrbp) > +{ > + return (struct ufshpb_rsp_field *)&lrbp->ucd_rsp_ptr->sr.sense_data_len; > +} Please introduce a union in struct utp_cmd_rsp instead of using casts to reinterpret a part of a data structure. > +/* routine : isr (ufs) */ The above comment looks very cryptic. Should it perhaps be expanded? > +struct ufshpb_active_field { > + __be16 active_rgn; > + __be16 active_srgn; > +} __packed; Since "__packed" is not necessary for the above data structure, please remove it. Note: a typical approach in the Linux kernel to verify that the compiler has not inserted any padding bytes is to add a BUILD_BUG_ON() statement in an initialization function that verifies the size of ABI data structures. See also the output of the following command: git grep -nH 'BUILD_BUG_ON.sizeof.*!=' > +struct ufshpb_rsp_field { > + __be16 sense_data_len; > + u8 desc_type; > + u8 additional_len; > + u8 hpb_type; > + u8 reserved; > + u8 active_rgn_cnt; > + u8 inactive_rgn_cnt; > + struct ufshpb_active_field hpb_active_field[2]; > + __be16 hpb_inactive_field[2]; > +} __packed; I think the above __packed statement should also be left out. Thanks, Bart.