Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4074509pxb; Mon, 27 Sep 2021 08:52:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfMwOrYQ9GEVX1vHN7NASyGojbVf7mVRUrWh4wBk6PL47cBc1Rbjd5rrQP2CLXN7tdMjly X-Received: by 2002:a17:907:206b:: with SMTP id qp11mr859720ejb.298.1632757974819; Mon, 27 Sep 2021 08:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632757974; cv=none; d=google.com; s=arc-20160816; b=F20ddO/vtor0cJ8xAwTjH/BzVZAjRhW1DE1j37UlunCQAGWb8HWssH7SczN+3m/VYp 3gb9xmHjiQILH6zyFNQQ6JwlQ8PPgECUX5pDPklyavBbMH0xp7zYGKzHETRz6qlReU7O Pg/mQjlBUGUZ0I4t1edfl207Ey+CMeqWwkENPArvUls36oOguHVrm7qGlf/DHeXyWEH5 PhdhzS6TZ60C1y0smdLwSDmpucdueZ8JJ/UU8aHZLayWcEFbK8938BcdREVlP8HfVwNF GtKQ9gvlYwuGrbFtD6MFF4c/UHemHQ6XjVZ/7b1K+OjTePsS2p/vLaap+BbXamYy9Rt4 sFCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=v+xeAqQtrxdivKj1IWKprjgOU77Kwqi66fMDnSQVG+k=; b=AzWT7WbWGpIaVQHPXGhGFmJ+CjsNEVRvAvJIoParN4m/tr+rmVADmFhIca0Q11O8ZN a4PpmVdHmXCq3SrLECPDLZ2Sjuq1QnZn+Daab+i96YwtpEXwaqRYO6DeQOJ4++/VTBqI lmzgrvq5ZhAdTj8uhtHNQbgS8vFdqR/RPWKiDqo+Y9CFSCzmcOp7gWOdAq7BQJZj3GUM bbCzIxXprbi9fgxKA/iMrk4T8ugRaPPlOhMWYO+SrEviRKZxjF87qMYVLugbd1Dg/B4v gvCMuiYUoMphtAptLKuFK1+gFJ+6Pe0UFbn46txbZgFK8RFyoqUh1TaH/4C+84nLoiHq WQ6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XQ7PLdBd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d10si17313196eja.699.2021.09.27.08.52.30; Mon, 27 Sep 2021 08:52:54 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XQ7PLdBd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235213AbhI0Pwg (ORCPT + 99 others); Mon, 27 Sep 2021 11:52:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:50334 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235202AbhI0Pwg (ORCPT ); Mon, 27 Sep 2021 11:52:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CB3066103B; Mon, 27 Sep 2021 15:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632757858; bh=UCCvAHzd6lqyG1Rjf5H7gKg4GmJepqO6vvcgkEy7RZk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XQ7PLdBdmuetfPXJ+PSPCgtbNt6QSQONep2sWIwT3Fl6uEyefMyjSyj9BXRQX8yND dUrCCIq3czIyt0u7FZSuEvl+Ul0WW8+nSiJZtoCo2IjtyUfnI+To5GVW4Ak4eNx17N eFYBEnHT8vGskYHaRBgzWwqebJv4TvJpwlOYcqXQ= Date: Mon, 27 Sep 2021 17:50:55 +0200 From: Greg Kroah-Hartman To: Nikita Yushchenko Cc: Lee Jones , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: most: dim2: force fcnt=3 on Renesas GEN3 Message-ID: References: <20210921165130.24178-1-nikita.yoush@cogentembedded.com> <17e51208-18b9-56d8-e8e3-2e40d6e94438@cogentembedded.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17e51208-18b9-56d8-e8e3-2e40d6e94438@cogentembedded.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 27, 2021 at 06:40:13PM +0300, Nikita Yushchenko wrote: > > > + dev_fcnt = pdata && pdata->fcnt ? pdata->fcnt : fcnt; > > > > Please use a real if () statement here and do not bury real logic in a > > crazy line like this one, as that is all but impossible to maintain over > > time. > > The same source file already uses the same form of conditional expressions several lines above: > > > ret = pdata && pdata->enable ? pdata->enable(pdev) : 0; It's not good there either. There is a reason this code is still in drivers/staging/ and that is one of them. Let's not duplicate bad code for no real reason please. > > dev->disable_platform = pdata ? pdata->disable : NULL; > > Shall I use real if statement for my expression while keeping those as-is? This looks ... strange. > Or shall I convert all conditional expressions to if statements? Do not add additional ? : statements in this patch. I would be glad to take an add-on patch after this that fixes up the other uses in the driver, but that should be separate as that is a separate issue here. thanks, greg k-h