From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F69A4C954B; Tue, 9 Jun 2026 19:02:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781031774; cv=none; b=H5Rdc6vNALpRd08pFSRy0IJBQp1LwEYF4HlboB7rvPy5sIRh16UcXw5JF+ACrg+GjuDTBJLoIuNXn9KSUPv1HC9UH/bUr4SuYkxUGjv7OJn3rHPpXG1fTjRkb5y06SDngdMbHA6OaGNRjrYG4eOD7I27ubg1cBFYKWFWVqljbxU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781031774; c=relaxed/simple; bh=deUspC86kBJfg0o/64mhshqzhfCZxHh4On4fEBT3WEI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qzvToyS4AG3KWrimrdw9L3XYdDF2E3vtnEWoX8LHYKckptJZi+HldDn43yMyy8fRjNwZiiJNcanF1zBJLhQx0ewJYIV127ew1u166YmPf2xB60+YGbMuqZ4rXiXxF/yXWCZJSj20UgGKGoZG2YqPcgkJYpSpnPoW+o1+6u8lyDc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Zl3Uy0gZ; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Zl3Uy0gZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1781031773; x=1812567773; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=deUspC86kBJfg0o/64mhshqzhfCZxHh4On4fEBT3WEI=; b=Zl3Uy0gZbwwyzsRUlofJ30QLYh5uLxgNSyajb1qludHqM3HxLCMPGy2W aHyOsPPKO333BpxcfRMS/QcTxvEo4zxXUpFNWStbfMbuQZKdF17q/NQki PMvi+52pF4V1CTKeuGXOod2u+oQMEZex7V5+VXAChaKC6ZiDQFLgSmbyl 5onuuy1d+CN2T55z1l4YAuGC/Y8Pckr0ykKvOIleQiHxp5xI9SCUxRNFC 6QgbTiTGWbQfNHu5str8RaBdKS4ckZ/Z8YWt6IGb8yVpRusdTT8FGTnH1 nfaFci4JMVVX/EfjY8f/t+pi2vrslQf+tVDFxoHwmvtnoCnW8yOaIj4A2 Q==; X-CSE-ConnectionGUID: Gb6YBAo4R4W93nXv0IEZUw== X-CSE-MsgGUID: Uh9r/mbURiqocDF3ZSaLoQ== X-IronPort-AV: E=McAfee;i="6800,10657,11812"; a="69341469" X-IronPort-AV: E=Sophos;i="6.24,196,1774335600"; d="scan'208";a="69341469" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2026 12:02:52 -0700 X-CSE-ConnectionGUID: QGqNAd4uTc+4Ed3shPeszQ== X-CSE-MsgGUID: Ak0qUeEaSXmuteJyhUjHrA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,196,1774335600"; d="scan'208";a="284012438" Received: from pgcooper-mobl3.ger.corp.intel.com (HELO localhost) ([10.245.245.162]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2026 12:02:47 -0700 Date: Tue, 9 Jun 2026 22:02:45 +0300 From: Andy Shevchenko To: Svyatoslav Ryhel Cc: Lee Jones , Daniel Thompson , Jingoo Han , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , David Lechner , Nuno =?iso-8859-1?Q?S=E1?= , Andy Shevchenko , Helge Deller , Johan Hovold , dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH v4 02/14] mfd: lm3533: Remove driver specific regmap wrappers Message-ID: References: <20260606045738.21050-1-clamor95@gmail.com> <20260606045738.21050-3-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Sat, Jun 06, 2026 at 10:22:43AM +0300, Svyatoslav Ryhel wrote: > сб, 6 черв. 2026 р. о 09:53 Andy Shevchenko пише: > > On Sat, Jun 06, 2026 at 07:57:26AM +0300, Svyatoslav Ryhel wrote: ... > > > + ret = regmap_assign_bits(als->lm3533->regmap, LM3533_REG_ALS_ZONE_INFO, > > > + LM3533_ALS_INT_ENABLE_MASK, enable); > > > > In cases like this perhaps leaving mask would be fine and together with > > I prefer to remove intermediate variables it the helper allows to > directly pass needed value. > > > struct regmap *map = als->lm3533->regmap; > > next patch drops lm3533 so there will be als->regmap which IMHO is > more logical instead of passing entire lm3533 to child devices. Still it's longer than map. A local variable may help with making lines shorter. > > this be nice one-liner: > > > > ret = regmap_assign_bits(map, LM3533_REG_ALS_ZONE_INFO, mask, enable); > > > > > if (ret) { > > > dev_err(&indio_dev->dev, "failed to set int mode %d\n", > > > enable); > > > > In many cases it won't increase LoC count. -- With Best Regards, Andy Shevchenko