Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp610372lqt; Thu, 6 Jun 2024 12:47:21 -0700 (PDT) X-Forwarded-Encrypted: i=4; AJvYcCU0ncPT5FvdhCn/uxooZKkSmDK+9c/9uq5BXZ/Uf65lCK0VW/aDsmsY2jbf5nyRBX3godwhusN5oiMEIbHU2fPmCjR8YI7Qkvuf6wrRxQ== X-Google-Smtp-Source: AGHT+IGzk/YRaURTN83WWqwHPrZP9UABoMIHml5n38rbAxICiPY60iSefX7ogUsYFIpqeDLiURFg X-Received: by 2002:a17:906:2a09:b0:a68:be06:b385 with SMTP id a640c23a62f3a-a6cda9ed2damr44139666b.62.1717703241526; Thu, 06 Jun 2024 12:47:21 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1717703241; cv=pass; d=google.com; s=arc-20160816; b=ImEKqOv5iNrROSLMNugE9sY6Bxc2231zXgTfKLuHJI1O0jwOeDI4ulZ5+0Lsr7QJnn QXZfHR/WqqQ5SM8wP5n7rx0slRWOFRNnT2iBLh27sY5bgqpAD1Lmaps5AC9LBsu3GGqT MOGrvz4Q4wQFviZOUwWTWFoEV7tUxTjc1RoIIBQGdzqR91njd0mdZJg2sI3+wFp4Sv5c ezM/w4I07iiXkwyKgJX3tIQfUi0603GL4bEIfn0CpW9FhhJInXP5igkMWoNUrnzfAp5A xFMvb9h56efCP583TxyE+qs+ZlRsQ01FT7aEy0G8LMvIDNxisprI59f42ZOB6cNiaQ6f 0rdQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UrClKJA9brL19M4WtLgma2oVHMAxwn+KD22tbsVdg88=; fh=igH5pIEKx3rOOhZwR4j7oL94pQ9wBBT6PLSY0LoyZ3I=; b=CwhDufI871QtsSaBsc3GgjGz/clN1c2k1g/J7G6toJdxJMAlZBIaKXYi0YFOsc9P/b 0ncRtFUrL8D0S/jGS5ckyVVnamE9DXeTzEBdo1Ad9uAL9eRt610U82sOL25luVPtdEdG k7wP7dZq0VhINluB8+WAnvXANpUB0NK+1o0fZhn+J/IRG7q0J6gK0L6RpOYviy5dIBCv tbV9sCoVFYcRWUHsuIY+DZ2+4iHqyMQxMWAfsssJ9iFAGPsmk4xcw96bAq1XjpBOJkzS 2u4lyYLdquyWMXZicpW31huIe1VVhDLRCOWnZ5tgnQUVok0PreLwJb37XNfxTVAWyCrt 0r7A==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b=q8ONmmOY; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-204953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204953-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6c805cc421si104208966b.231.2024.06.06.12.47.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 12:47:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b=q8ONmmOY; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-204953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204953-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 42F441F272D4 for ; Thu, 6 Jun 2024 19:47:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22D5961FDE; Thu, 6 Jun 2024 19:47:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=iki.fi header.i=@iki.fi header.b="q8ONmmOY" Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) (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 9E5563BBCC; Thu, 6 Jun 2024 19:47:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=185.185.170.37 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717703233; cv=pass; b=heFxj0WHfXFpmRFYwugGU4r8l6I+QMDeiPV4twPwEYK+1FFpR41bG2IPC3ip5sKqwcVrZmFiDRk09kWnPzPGGPMC2ue4D/q7vjo7RozHtp+Slf6aMTAH3EZ0l652dgw++Q93qRGZFtT4xauNDbTeo8bnHEDKDQW70h4fg5QUDUc= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717703233; c=relaxed/simple; bh=95JBikPb0VU85plNVzpeTui8k5LLPaKq/tw9FQgiWEg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gQyIDa5ikGiwyUdx6niQAvgkTv0XuycagP6zcoxD//UphQWmWt2MtghiagihqcIDNPskoRJzxaV40nxz5aMZRHC311zeF1brb2SfJSNKSF1rtqqmhEbr0PY/pbb9pjeBoqiOHbshWsAeGWB+3vfEo6baw2D6oVN98cNf0N3fPyE= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (2048-bit key) header.d=iki.fi header.i=@iki.fi header.b=q8ONmmOY; arc=pass smtp.client-ip=185.185.170.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from darkstar.musicnaut.iki.fi (85-76-74-208-nat.elisa-mobile.fi [85.76.74.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: aaro.koskinen) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4VwFGN5c5Mz49Q3M; Thu, 6 Jun 2024 22:47:08 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1717703229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UrClKJA9brL19M4WtLgma2oVHMAxwn+KD22tbsVdg88=; b=q8ONmmOYIBVmAKqu/7z3JAZwLs8Inom5+FHT0lLXpcJHH8m0xNQ1Ap7BqdEidau+Ek5fJW BD+nsD9U54bL8nK91DTmFsogCXGWR9FjzHUsR/JkQZBhgW4Sjg3/4WcfOgrI1txJeOqCtC 4tZh9sfV4Y+e2W82JAtjUimvn/3ZaZjOmnrLjrzH6tfU62Tv2nL/kZw1qv6cUBQj8N/DbE sSlYyGDcNH/LQTFkUogxRIghCwmmvYmJSgBxxNwb5Yhb3Ke5HwI5dzVeOAfyOpkU7qHpxZ F3nXVeSadgaIwvmc3sm+4yVooTw6NlythJuZVROYWmx0us+IideVRVof1zkXqg== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1717703229; a=rsa-sha256; cv=none; b=F+VKMfVokwqydHJto6eK36ByJZYaGwuU+I1cS62avWh7lOjhR3F0XmU+wjFJW0qOic3rR7 pc3EJtN46x9xL9P5rXlqWC4MFwFMWGDzp1SMcLF+dJdsigd4xn31N6rSXaG4kPjyB4pATj pLkzYE/BHaihgrPhICSVPNz6FiLmJTlzTMbHUkwVcyUR455TcNhF1ZCnUrJMN+cLkPPDcn rGMe2p6eVqd2NdaOw7Fo3EQ6oF9j9GqchXxJg/DboxZL5UlRPjI7jvxfhVt9qTK/K9vfVH lM/BvxzWa1KJ3j5+w4gA1vNccbnh4v1Ci6afPZz2R1/NKZkoWNiNi/fAcw7B+w== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=aaro.koskinen smtp.mailfrom=aaro.koskinen@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1717703229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UrClKJA9brL19M4WtLgma2oVHMAxwn+KD22tbsVdg88=; b=ZMKaHRbImTolUYoichVgjsIobmvUgMeIx4GAPk8gHzRfIJv0ktSjDgoficvnk2uwLomb1N nz6Ctv/qIEsrMJA1bmtjWDFT7re8hC2FgFo6VjnVT5m57V+9ocZpJj5E/vko8T7fag2NFo WyYtXz8+yxN/nZhU5vQTKRLX43pcf9s8hqtk0G6ag8Bm0bLVKlZkzSRSgg9aN+425hCOMk L0l1YE9ytJ1F1ZtVlAf/3R3vH3E+l+2WnyziB2CjuQs80vtNKMP79Vl6B0fK4IyBOUxkmu aDTgOg9zjs5dnV0PCR4P6ODR3Ca0cF7dBr5iHUwY+FvG6FCPdF+bRe4Pdg9/zQ== Date: Thu, 6 Jun 2024 22:47:07 +0300 From: Aaro Koskinen To: Andy Shevchenko Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Tony Lindgren , Russell King Subject: Re: [PATCH v1 1/1] ARM: omap2: Switch to use kmemdup_array() Message-ID: <20240606194707.GE9487@darkstar.musicnaut.iki.fi> References: <20240606165104.3031737-1-andriy.shevchenko@linux.intel.com> <20240606193202.GD9487@darkstar.musicnaut.iki.fi> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jun 06, 2024 at 10:43:07PM +0300, Andy Shevchenko wrote: > On Thu, Jun 06, 2024 at 10:32:02PM +0300, Aaro Koskinen wrote: > > On Thu, Jun 06, 2024 at 07:51:04PM +0300, Andy Shevchenko wrote: > > > Let the kememdup_array() take care about multiplication and possible > > > > ^^^^^ > > Typo. > > Aha, thanks! > > > > overflows. > > ... > > > > - hwmods = kmemdup(ohs, sizeof(struct omap_hwmod *) * oh_cnt, GFP_KERNEL); > > > + hwmods = kmemdup_array(ohs, oh_cnt, sizeof(*hwmods), GFP_KERNEL); > > > > Maybe same result, but I guess the 3rd parameter should be count? > > Actually it is going to be changed to follow kcalloc(). > https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git/commit/?id=0ee14725471c OK, good, you can add: Reviewed-by: Aaro Koskinen A.