Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5550227imu; Tue, 13 Nov 2018 08:12:53 -0800 (PST) X-Google-Smtp-Source: AJdET5dhqXjxAUmIx136XqNgrWIGOnuiOPAOkmM5c71Bn0GNz5excGAGOeCwRAZlpx/khF7zwnv4 X-Received: by 2002:a62:5793:: with SMTP id i19-v6mr5943297pfj.158.1542125573333; Tue, 13 Nov 2018 08:12:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542125573; cv=none; d=google.com; s=arc-20160816; b=Fm/Hfy3uNZQj34YuIMxDDoxakgx4AyaSlROULKLMsVXOh3RBg+ob9kG2nCAwl+0xzG w1mZItfGs+KzOZ9qg5i1GZ9VNtzMS4qogQtj1YfeDt9ac5WueDHN5DSlnK/BST74rpZ7 Hx4HM9ENg+Wef4bSIk6U7AkWGKvKpDRxaZHx0CzH3yvJ5lYTNTfkJ6G8t3B88obqboCf T/0BSj8+zSw7iuUcSeQvmW7o6OsSWR+GASblKt0u65CkJlZESQoDpKKHTyR8bpP2p4/N tTacP4pFzNPIZcLFio2mfvDydnpb9Sm4/9Q38UW2PD0wx8uTy5gEn9/NkQWumT6Gyy15 vBUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject; bh=IPuc15RjcLWHn1+87eX292SD4Sd2Opj9uyRzgx4aToM=; b=GkILFdfkyuxDj1RueLgo41IYGgsa/mCKNxnww6wc0MvilgXJm3/A4QwRJ/FWkxULoN IoE7xK1g+1ZyaWT7wjfdg2V4yJwNtjBsmpF31p/g8jKIqloG5y5xeE+U82kCPJVOnJWu GJtw6eRNpdibIFhdOCXKUScHqZmHDvgz/D1WwGUsx4qtH4vt3hCUhknwjhOZsKANJ6Ra WJwQmem4lIqRqvhlnSoQSZopd/kV2w1kpzBigP2X143T2i36A5/v2gMZPZTMV6MPfkIl 4vKK/b0F+1jB/eb7ObALnb24Ni/z1iiZjUkgyiawTELS4koOpdeGkGx5cc337fjKk4eG vOjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si20594997pgl.484.2018.11.13.08.12.12; Tue, 13 Nov 2018 08:12:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388159AbeKNCKL (ORCPT + 99 others); Tue, 13 Nov 2018 21:10:11 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:20819 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388130AbeKNCKL (ORCPT ); Tue, 13 Nov 2018 21:10:11 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wADG9Alo101948 for ; Tue, 13 Nov 2018 11:11:25 -0500 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nr1u708d5-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 13 Nov 2018 11:11:25 -0500 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Nov 2018 16:11:24 -0000 Received: from b03cxnp08028.gho.boulder.ibm.com (9.17.130.20) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 13 Nov 2018 16:11:18 -0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wADGBHWK17498188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 13 Nov 2018 16:11:17 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B9AA678060; Tue, 13 Nov 2018 16:11:17 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6B3137805C; Tue, 13 Nov 2018 16:11:15 +0000 (GMT) Received: from [192.168.45.84] (unknown [9.85.169.48]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 13 Nov 2018 16:11:15 +0000 (GMT) Subject: Re: [PATCH] drivers/scsi/fnic/fnic_trace.c: Use vzalloc From: James Bottomley To: Johannes Thumshirn , John Garry , Sabyasachi Gupta , satishkh@cisco.com, sebaddel@cisco.com, kartilak@cisco.com, martin.petersen@oracle.com Cc: jrdr.linux@gmail.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, brajeswar.linux@gmail.com Date: Tue, 13 Nov 2018 08:11:13 -0800 In-Reply-To: <13d3418f-49d1-d683-48a6-cedbc073d86f@suse.de> References: <5beae8ff.1c69fb81.bd59a.b7fa@mx.google.com> <13d3418f-49d1-d683-48a6-cedbc073d86f@suse.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18111316-0020-0000-0000-00000E895FE0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010042; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01116900; UDB=6.00579265; IPR=6.00897009; MB=3.00024144; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-13 16:11:22 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111316-0021-0000-0000-000063B3CCD9 Message-Id: <1542125473.3042.6.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-13_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=810 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811130147 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-11-13 at 16:53 +0100, Johannes Thumshirn wrote: > On 13/11/2018 16:44, John Garry wrote: > > On 13/11/2018 15:08, Sabyasachi Gupta wrote: [...] > > > - fnic_trace_buf_p = (unsigned long)vmalloc((trace_max_pages * > > > PAGE_SIZE)); > > > + fnic_trace_buf_p = (unsigned long)vzalloc((trace_max_pages * > > > + PAGE_SIZE)); > > > > If you remove the extra brackets in vzalloc() argument then you may > > not spill onto the next line. > > And remove the unnecessary cast. vzalloc() (just like vmalloc()) > returns a void*, so no reason to cast it. This is incorrect advice: there's no need to cast it to other *pointer* types, but if you cast it to a non-pointer type (which this is doing) the compiler will complain if there is no explicit cast. James