Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758361AbcDHNHN (ORCPT ); Fri, 8 Apr 2016 09:07:13 -0400 Received: from mga14.intel.com ([192.55.52.115]:41969 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbcDHNHM (ORCPT ); Fri, 8 Apr 2016 09:07:12 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,449,1455004800"; d="scan'208";a="81565703" From: Alexander Shishkin To: Chunyan Zhang Cc: linux-kernel@vger.kernel.org, zhang.lyra@gmail.com, mathieu.poirier@linaro.org Subject: Re: [PATCH v2] stm class: correct masterID range in setting via sysfs In-Reply-To: <1460120296-1794-1-git-send-email-zhang.chunyan@linaro.org> References: <1460120296-1794-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: Fri, 08 Apr 2016 16:07:08 +0300 Message-ID: <87a8l4xn9f.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: 658 Lines: 18 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', Actually, STP specification allows up to 65536 masters ([0..65535]), so technically there's no problem. :) The comparisons are still bogus, though. I'll amend your commit message. Thanks, -- Alex