From patchwork Tue Sep 8 12:54:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11763337 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DE0B6112E for ; Tue, 8 Sep 2020 12:55:05 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B237C222C8 for ; Tue, 8 Sep 2020 12:55:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B237C222C8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFd8h-0003hR-2O; Tue, 08 Sep 2020 12:54:23 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kFd8g-0003hK-7U for xen-devel@lists.xenproject.org; Tue, 08 Sep 2020 12:54:22 +0000 X-Inumbo-ID: 567e12a6-6ad3-401b-a043-8d0b5d74d648 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 567e12a6-6ad3-401b-a043-8d0b5d74d648; Tue, 08 Sep 2020 12:54:21 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 22842ACB7; Tue, 8 Sep 2020 12:54:21 +0000 (UTC) To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , George Dunlap , Ian Jackson , Julien Grall , Wei Liu , Stefano Stabellini From: Jan Beulich Subject: [PATCH] lib: correct __moddi3() description Message-ID: <6c8ab543-67dd-62ed-2542-48fa7395e541@suse.com> Date: Tue, 8 Sep 2020 14:54:20 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The remainder of a division, when non-zero, is specified to always be of the same sign as the dividend. Bring a comment in line with the code it describes. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- a/xen/common/lib.c +++ b/xen/common/lib.c @@ -390,7 +390,7 @@ u64 __umoddi3(u64 a, u64 b) * 11 % 5 = 1 * -11 % 5 = -1 * 11 % -5 = 1 - * -11 % -5 = 1 + * -11 % -5 = -1 */ s64 __moddi3(s64 a, s64 b) {