From nobody Sat Nov 15 20:32:09 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1596701376; cv=none; d=zohomail.com; s=zohoarc; b=K6dDpg+jMSOb36FsSRZIP3z40EvOZHm2mqSNIiTyzi8QCaU8fG+5s2RE9c2uDwy6tS4d+OXTomojQOLtHxxIQ8JO8t7bkwPjIkmTVB+Tb9L/GJzk5ENK+XPSZA2Oit3z32CxkbmWgCugfA7qGfw01WShb+bYbBUEVB5+YxAd5rg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596701376; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=4+aXm2ggWfq1Fly1rmq/Lj+bQKm9iyQ1C1siDyh5+3o=; b=Tpk32FU0BZbhRq5uF5v473DJPWw1FrgzvUbU744bdfPc2xeYO+G96YaMju/Mw8NFvIHEc6e4ev97dUleSCTILtvkC6Onj4PkA5MgXY774RTl7mfsdLH8/VBW6m8q0Koq1rfInuLoDWppNf2s2NYI7jh1VdQqxNGdWoVSTxlB5Kc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1596701376387609.073854720873; Thu, 6 Aug 2020 01:09:36 -0700 (PDT) Received: from localhost ([::1]:50440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3axz-0003xi-0k for importer@patchew.org; Thu, 06 Aug 2020 04:09:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3awz-0002GZ-8M; Thu, 06 Aug 2020 04:08:33 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:36307) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k3awx-0005g1-NO; Thu, 06 Aug 2020 04:08:32 -0400 Received: by mail-wr1-x444.google.com with SMTP id 88so43044772wrh.3; Thu, 06 Aug 2020 01:08:30 -0700 (PDT) Received: from localhost.localdomain (121.red-81-40-121.staticip.rima-tde.net. [81.40.121.121]) by smtp.gmail.com with ESMTPSA id w2sm6039587wre.5.2020.08.06.01.08.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 01:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4+aXm2ggWfq1Fly1rmq/Lj+bQKm9iyQ1C1siDyh5+3o=; b=vBIqgLBL2GNNUoliO1+45+XjA00P0+68zsF6XGyQV6irjsbG0+pF3A8i+4AJpF8911 hqYyNeTbUjnauH/vE+HyFZnMyWEdyCOiFEnEsn5SmG7fmG65uCsg4yEHAVyHrjjunwNC k5m/XbXEonFRdztED73Y2XmR5Tdy9RRBPEscDwN410wqfjkh37igJPEl7ZOXmG6Uh69D /hRMhZGMx3b7v2TzhsguyD2fci82sqETGIZTCjERzsxNSoxz/tW14M1vuE6hdcrgr+nG WDiOtafb0hOHp6r9T7jj4ALHUHUE0A8MjRdKiqOWrC/Jh1fgYoyxkOiOai+j+ddPA+hU Qhkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=4+aXm2ggWfq1Fly1rmq/Lj+bQKm9iyQ1C1siDyh5+3o=; b=uc2XUo7Ttiq1iqAAAGSRUVETQ0aEUW15Y79sw4T+qj1D/1HAtmi6waj3DCkFtqRaIK atVmZOjyxoFXV83VRv6+8DC3gujFvTe/L6b2zMSRUNsAfhtOwT9EOZzEPlooJCiWwM2W E94byvTkFSUWvTe28bB5j13Oo8TfTeGM9gB3UxFmgVQk+ivJ28/BhQO/gzpPXdOOJVYg 6sfUlDolfPgsqziCS+cGhB84IKGywYzfqgS9bDiJU88ZG/pO1tPMIV0CHd9wmlooAW4V 4CJSHU8xwKSeyZDi9yH0L1D3zT15qG6GU9H9y/oZL5x4WkaeWaP+UhdxQFVVCr/NYCe5 rs+A== X-Gm-Message-State: AOAM531RG76uHpmuZYEjj7tnk/OsrgpVnaxYb3CUcUI9HboQOhtPltLE dZp63kMxW0Cqhzbz4hjLElg6bzEh X-Google-Smtp-Source: ABdhPJzupK0w6Pw7Yv3JZ9t//wVtZZTftWvR1hHu7uKTk88NmVL83zwitQ5FW2WzZkaPUh2Vk174og== X-Received: by 2002:a5d:51c3:: with SMTP id n3mr6340324wrv.104.1596701309639; Thu, 06 Aug 2020 01:08:29 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH-for-5.2 2/7] hw/block/fdc: Let sector offset be unsigned Date: Thu, 6 Aug 2020 10:08:19 +0200 Message-Id: <20200806080824.21567-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200806080824.21567-1-f4bug@amsat.org> References: <20200806080824.21567-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , John Snow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Sector offset can not be negative, make it unsigned. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/block/fdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 2cec7568c1..c91ed7ee2d 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -259,7 +259,7 @@ static uint32_t fd_sector(FDrive *drv) } =20 /* Returns current position, in bytes, for given drive */ -static int fd_offset(FDrive *drv) +static uint64_t fd_offset(FDrive *drv) { g_assert(fd_sector(drv) < INT_MAX >> BDRV_SECTOR_BITS); return fd_sector(drv) << BDRV_SECTOR_BITS; --=20 2.21.3