Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755640AbbEUX0U (ORCPT ); Thu, 21 May 2015 19:26:20 -0400 Received: from mail-qg0-f43.google.com ([209.85.192.43]:34909 "EHLO mail-qg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754067AbbEUX0T (ORCPT ); Thu, 21 May 2015 19:26:19 -0400 Date: Thu, 21 May 2015 19:26:15 -0400 From: Tejun Heo To: Vladimir Zapolskiy Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: sysfs: don't pass count == 0 to bin file readers Message-ID: <20150521232615.GA7099@htj.duckdns.org> References: <1432243276-27733-1-git-send-email-vz@mleia.com> <20150521221423.GK4914@htj.duckdns.org> <555E647F.7070907@mleia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <555E647F.7070907@mleia.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 596 Lines: 22 Hello, Vladimir. On Fri, May 22, 2015 at 02:04:31AM +0300, Vladimir Zapolskiy wrote: > But "!size" is a special case, > > if (!count || pos >= size) > return 0; > > seems to be incorrect in case of !size ===> (pos >= size) == true. Hmmm... Why is that wrong tho? If size is zero and pos is zero, there's nothing to do, no? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/