Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp2624195ybb; Sat, 30 Mar 2019 09:28:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVpBhL/lt4Qlux72YIoJ4iQAqvfVC/1hZnNprlk7M1xptqUdNbsWC9eg4394qy2zmBvxm7 X-Received: by 2002:a62:4746:: with SMTP id u67mr53275592pfa.243.1553963308257; Sat, 30 Mar 2019 09:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553963308; cv=none; d=google.com; s=arc-20160816; b=iwFjvr29zaOe8T8lawCSCwncaBdZRJIHrpv4Dn9IIDpNHW0pnVktCOO9l2pGpaJrxh a1Enlac99LYe1kpaoq22Y4ReBRV3h30DrAVo32Ti46SC4eeyjb7qYzm+bTkk8a3+PFLI ep2cbicxQmy6tZqaZ4EF3glnPR8QNhs+5TmmHTJWvhr06Eq0QL7CxZTtwDyB0eg1lvvc rhLcR02tLnUvW7NjlPpZavupUv89RtrdlqUQ3FJ/J7/m4oGxXmuVCt9V29FczJXmDKcP OMGL68WxB5wY3cg8czwONJ/qeCNbveW8cspJWzu6h33iLm4ask9PUuxcncjnAjVS0/eu ww+w== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=6Uvjb7ymgvoM3oZQjJrkx3rbtA8AVijstgbgJYjQrIU=; b=Wl3aDLGLyDSx4LeW+prStbMbg70UX5Q8yVdDd8v2BcqCN4nmL2RkCo9U1mPq4gpnPS 33OivKdpjXLKwp/117R341dnYkKM9EHoU92PyMC9NA05mo1n0LAm3PCc/XubbTYjGCHN JJrz9OJTA3514W/bUC2SRyzDvvwZIbAjMo+kVs2br2pwDhqaYwhwuFUHHlR9IR+WEPf7 TuuPVwLY9Tiu0Y0uL6A0pE+0Y6oMdwjyAZKugfMsVQOQ7aCnEzmiwxUAzJdm+k/NUsP/ Gv5nm/MtSSGZ3qgGDXGilEJUbvlWDGapPZD1p/IAu30rjEj0R2yNHZ8Iae10W80zZJa+ 42fA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si4441628pfd.88.2019.03.30.09.28.12; Sat, 30 Mar 2019 09:28:28 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730922AbfC3Q1h (ORCPT + 99 others); Sat, 30 Mar 2019 12:27:37 -0400 Received: from smtprelay0229.hostedemail.com ([216.40.44.229]:44058 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730537AbfC3Q1h (ORCPT ); Sat, 30 Mar 2019 12:27:37 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id BA11E182CF671; Sat, 30 Mar 2019 16:27:35 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:599:800:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:1981:2194:2199:2393:2553:2559:2562:2691:2693:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3870:3871:3872:3873:3874:4250:4321:4605:5007:7904:10004:10400:10848:11026:11232:11473:11658:11914:12043:12438:12740:12760:12895:13069:13095:13161:13229:13311:13357:13439:14096:14097:14181:14659:14721:21080:21433:21627:30012:30054:30064:30090:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.14.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:36,LUA_SUMMARY:none X-HE-Tag: doll98_24fd9dbeda04f X-Filterd-Recvd-Size: 2414 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf15.hostedemail.com (Postfix) with ESMTPA; Sat, 30 Mar 2019 16:27:34 +0000 (UTC) Message-ID: Subject: Re: [PATCH v3] HID: intel-ish-hid: ISH firmware loader client driver From: Joe Perches To: Rushikesh S Kadam , Nick Crews Cc: Srinivas Pandruvada , benjamin.tissoires@redhat.com, jikos@kernel.org, jettrink@chromium.org, Gwendal Grignou , linux-kernel , linux-input@vger.kernel.org Date: Sat, 30 Mar 2019 09:27:32 -0700 In-Reply-To: <20190330102230.GB19202@intel.com> References: <1553889813-17677-1-git-send-email-rushikesh.s.kadam@intel.com> <20190330102230.GB19202@intel.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2019-03-30 at 15:52 +0530, Rushikesh S Kadam wrote: > On Fri, Mar 29, 2019 at 04:30:18PM -0700, Nick Crews wrote: > > On Fri, Mar 29, 2019 at 1:03 PM Rushikesh S Kadam > > wrote: > > > + ldr_xfer_ipc_frag = kzalloc(LOADER_SHIM_IPC_BUF_SIZE, GFP_KERNEL); > > > + if (!ldr_xfer_ipc_frag) { > > Log error here. > The error code is logged in calling function > load_fw_from_host(). Is that good enough? > > I believe the checkpatch script too, would > recommend against adding debug print for ENOMEM > error. The generic kernel allocation functions already do a dump_stack() on OOM conditions when called without __GFP_NOWARN so any additional OOM message isn't particularly useful. > Again, I thought it was against practise to log > "out of memory" debug prints in probe() Or anywhere else given the generic OOM stack dump. > But will add if you tell me this is the right way. > > > > + return -ENOMEM; > > > + > > > + loader_ishtp_cl = ishtp_cl_allocate(cl_device); > > > + if (!loader_ishtp_cl) > > > > log error here The ishtp_cl_allocate function just calls kmalloc then initializes the struct so an additional OOM message isn't useful here either.