Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp481193ybj; Wed, 6 May 2020 23:58:17 -0700 (PDT) X-Google-Smtp-Source: APiQypKSeZiepMPonOLGlNX3qAYql9y9SOSu86Txdesr03TU2RpNsyZhx/Upsx1fYSElCFMJeu8A X-Received: by 2002:a05:6402:1adc:: with SMTP id ba28mr10494621edb.12.1588834697736; Wed, 06 May 2020 23:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588834697; cv=none; d=google.com; s=arc-20160816; b=XSmVAkEQwfXALFf7lkK8CURRUJ0pHC48nUoOabXx5s5BOAJWbyA7VHmNeBJLEsoVEj oDm1+3+oj/QcM1dhn7m/wqk8WiMxN/h97f2KOOaMmPJ6MdotoUZ15ezkXVlAKcPY+5cQ YjOS8Do/Rs8aAAbScu1gPhI5B/FjeLcTWzFk8xM4V86h9/MMCog8Qb988P+nU6V67diP Ja0659s3vzrO/dCbM8aVXhUlW47r4KQ3Ewa5ZO8D95c3oFy1cuus0ejD3haaAJ3uYjz5 f+28vHWqrN6CzlbQ9flTunhj4HJad4x4tqVVXjRNVdq+6HyP/NvXzL996Sb/7N9ZQ7M7 zWBg== 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=F+LHL9HhzB+SbAQZb7trdtJA9Ab4A5q2BH5Qp0c1c2Y=; b=NfzoZV+qXxfcj2EIRrsAOfCeERbwS8QqdXkgZb55SyDWuYD1BIqQLNPBYEpcwWbdOp kDr2s+fgCOI0vmOAWK2i9b4Cj4SL04Hf7w57pMgqwUwtpsIQ+A3/sawE+oTxSIQ7Z8dl AcntGcWHq5UMxuvRjiO0WJ8YaIP1U95J6TQYFH6e8vtUtTZowV0TByMxZaVp+CUmOh6f LCZDkJwp7GMo28sw416SxmY52aKf8TRSa+7vqbog1zQ/lggCZsVL8FpJcBCE7mJj/2SB Md3q7zdiNj/vymU+3fIVDu/qMDUoMzmmPG0eriPx6cbWiims/R6rlibR2vNVXD307tKl 5yog== 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 bx8si2556907edb.25.2020.05.06.23.57.54; Wed, 06 May 2020 23:58:17 -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 S1725905AbgEGGze (ORCPT + 99 others); Thu, 7 May 2020 02:55:34 -0400 Received: from smtprelay0208.hostedemail.com ([216.40.44.208]:36912 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725809AbgEGGze (ORCPT ); Thu, 7 May 2020 02:55:34 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 643B412F5C; Thu, 7 May 2020 06:55:33 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3872:3874:4321:5007:10004:10400:10848:11026:11232:11473:11657:11658:11914:12043:12048:12296:12297:12438:12740:12895:13069:13311:13357:13439:13894:14659:14721:21080:21212:21627:21990:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: mass87_4d4fdba8e3930 X-Filterd-Recvd-Size: 2187 Received: from XPS-9350.home (unknown [47.151.136.130]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Thu, 7 May 2020 06:55:31 +0000 (UTC) Message-ID: <777550697e44478c46768db5265dcdda094932f4.camel@perches.com> Subject: Re: [PATCH] drm/amdgpu: allocate large structures dynamically From: Joe Perches To: christian.koenig@amd.com, Arnd Bergmann , Alex Deucher , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter , Hawking Zhang , John Clements Cc: Guchun Chen , Tao Zhou , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Dennis Li Date: Wed, 06 May 2020 23:55:30 -0700 In-Reply-To: <845a2e12-538c-fb6d-db80-78e8adf1413f@gmail.com> References: <20200505140208.284473-1-arnd@arndb.de> <006e29037a9314fb286a5d6d84905bce99cef6c7.camel@perches.com> <845a2e12-538c-fb6d-db80-78e8adf1413f@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-05-07 at 08:42 +0200, Christian K?nig wrote: > Am 06.05.20 um 21:01 schrieb Joe Perches: [] > > And trivia: > > > > The !! uses with bool seem unnecessary and it's probably better > > to make amdgpu_ras_is_feature_enabled to return bool. [] > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c [] > > @@ -560,7 +560,7 @@ static int __amdgpu_ras_feature_enable(struct amdgpu_device *adev, > > */ > > if (!amdgpu_ras_is_feature_allowed(adev, head)) > > return 0; > > - if (!(!!enable ^ !!amdgpu_ras_is_feature_enabled(adev, head))) > > + if (!(enable ^ amdgpu_ras_is_feature_enabled(adev, head))) > > And while we are at improving coding style I think that writing this as > "if (enabled == amdgpu_ras_is_feature_enabled(adev, head))" would be > much more readable. that's decidedly true...