Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757002AbcCaNnO (ORCPT ); Thu, 31 Mar 2016 09:43:14 -0400 Received: from mga14.intel.com ([192.55.52.115]:13717 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756882AbcCaNnE (ORCPT ); Thu, 31 Mar 2016 09:43:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,422,1455004800"; d="scan'208";a="678594034" From: Alexander Shishkin To: Chunyan Zhang Cc: linux-kernel@vger.kernel.org, mathieu.poirier@linaro.org, zhang.lyra@gmail.com Subject: Re: [PATCH] stm class: correct masterID range in setting via sysfs In-Reply-To: <1459151742-31733-1-git-send-email-zhang.chunyan@linaro.org> References: <1459151742-31733-1-git-send-email-zhang.chunyan@linaro.org> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 31 Mar 2016 16:43:00 +0300 Message-ID: <8760w27ogr.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 671 Lines: 15 Chunyan Zhang writes: > The type of masterID is defined as 'unsigned int', theoretically one > can set masterID with a number larger than 'INT_MAX' as long as > 'stm_data::sw_end' is larger than 'INT_MAX'. > > Also, 'stm_data::start' and 'stm_data::end' is initialized in respective > drivers which should be able to use any value less than 'UINT_MAX' for > their masterIDs, of course including those values larger than 'INT_MAX', > but the current policy is wrongly assuming that masterIDs would not be > larger than 'INT_MAX'. This patch just corrected that. > > Signed-off-by: Chunyan Zhang Good catch, thanks!