From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1DF4C43441 for ; Tue, 13 Nov 2018 16:11:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7ED342175B for ; Tue, 13 Nov 2018 16:11:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7ED342175B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388172AbeKNCKL (ORCPT ); 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