From nobody Mon Feb 9 10:38:27 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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; dmarc=pass(p=quarantine dis=none) header.from=crudebyte.com ARC-Seal: i=1; a=rsa-sha256; t=1604655574; cv=none; d=zohomail.com; s=zohoarc; b=bHOyjUYe4MkZRA+9GBRoGkB/4k2/5rvxYEs1WgWpSRgpMPfkBSKWdO3J1Y76JR8J4XjquXXB9M0JDScQhLreIm39eynTREowSXMID6VEwLGm0IZ5bedGT0v5AOBkOkh9gK2bH3WWo1EZQzIRj21udllCML+JtMXOdOlc3O1JoVE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604655574; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=cuovt0Feftktuski+XJazOvPm4C/mceIzl+3zbI0FZ8=; b=aP1eGRjUUBlij3ShBOo46j2jycwnRokG1xjPse0Trni2KR7FGvQ05kx4iGRkcy7DWP3AgtOojX9IXtmSXwe3lr9iO31L52J6yNrLpxSR26t0qLrlum8K3nnddU/Azl6u8K0hyw17TN9pIBVjNMMAHOaJXSJc5l73gs2h0nZBAgU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=quarantine dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1604655574056236.62130340868418; Fri, 6 Nov 2020 01:39:34 -0800 (PST) Received: from localhost ([::1]:36540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kayDV-0007Zd-36 for importer@patchew.org; Fri, 06 Nov 2020 04:39:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <01011733ea3177e437d8999b77c73caa93266896@lizzy.crudebyte.com>) id 1kayCA-0006Cv-Uo for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:12 -0500 Received: from lizzy.crudebyte.com ([91.194.90.13]:54727) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <01011733ea3177e437d8999b77c73caa93266896@lizzy.crudebyte.com>) id 1kayC9-000796-7J for qemu-devel@nongnu.org; Fri, 06 Nov 2020 04:38:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=crudebyte.com; s=lizzy; h=Cc:To:Subject:Date:From:References:In-Reply-To: Message-Id:Content-Type:Content-Transfer-Encoding:MIME-Version:Content-ID: Content-Description; bh=cuovt0Feftktuski+XJazOvPm4C/mceIzl+3zbI0FZ8=; b=ok+CN syu6BAjYPGwGU0UYN2bpeYrTjLZdPh1CwzhezSepRKgrQvr2Uev6drbO1xxMBL/iBwX9J7UMdeRLJ SIkcsrK3FFGpBkjBxxr0EU2D9LGfaDW09bVkp6/pUF22rD0vSydGJe3J1T/qv+yFaajhqAcZAcDRr 6OtHteQFPJLlSmzrYNg/0Qe+eW4mwe9yl1sEp5dcxwv6K4V/YHu8ko04X7b5p2E6yUHqLK9jiYkYB 411lcz/91HQwdIZJelvj/8gvKOiumPOpJRwSJYXh/hmHaXF3kpZtWChkB3qOZ9I7vj9JMLOEJfWVZ SW7pSpOREUuL3NG2Y0urAQEHZBLRw==; Message-Id: <01011733ea3177e437d8999b77c73caa93266896.1604653990.git.qemu_oss@crudebyte.com> In-Reply-To: References: From: Christian Schoenebeck Date: Fri, 06 Nov 2020 10:13:10 +0100 Subject: [PULL 1/4] hw/9pfs : add spaces around operator To: qemu-devel@nongnu.org, Peter Maydell Cc: Greg Kurz , Xinhao Zhang , Kai Deng 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: none client-ip=91.194.90.13; envelope-from=01011733ea3177e437d8999b77c73caa93266896@lizzy.crudebyte.com; helo=lizzy.crudebyte.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/06 04:36:52 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @crudebyte.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Xinhao Zhang Fix code style. Operator needs spaces both sides. Signed-off-by: Xinhao Zhang Signed-off-by: Kai Deng Reported-by: Euler Robot Reviewed-by: Greg Kurz Message-Id: <20201030043515.1030223-1-zhangxinhao1@huawei.com> Signed-off-by: Christian Schoenebeck --- hw/9pfs/9p-local.c | 10 +++++----- hw/9pfs/9p.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c index 3107637209..af52c1daac 100644 --- a/hw/9pfs/9p-local.c +++ b/hw/9pfs/9p-local.c @@ -162,13 +162,13 @@ static void local_mapped_file_attr(int dirfd, const c= har *name, memset(buf, 0, ATTR_MAX); while (fgets(buf, ATTR_MAX, fp)) { if (!strncmp(buf, "virtfs.uid", 10)) { - stbuf->st_uid =3D atoi(buf+11); + stbuf->st_uid =3D atoi(buf + 11); } else if (!strncmp(buf, "virtfs.gid", 10)) { - stbuf->st_gid =3D atoi(buf+11); + stbuf->st_gid =3D atoi(buf + 11); } else if (!strncmp(buf, "virtfs.mode", 11)) { - stbuf->st_mode =3D atoi(buf+12); + stbuf->st_mode =3D atoi(buf + 12); } else if (!strncmp(buf, "virtfs.rdev", 11)) { - stbuf->st_rdev =3D atoi(buf+12); + stbuf->st_rdev =3D atoi(buf + 12); } memset(buf, 0, ATTR_MAX); } @@ -823,7 +823,7 @@ static int local_open2(FsContext *fs_ctx, V9fsPath *dir= _path, const char *name, if (fd =3D=3D -1) { goto out; } - credp->fc_mode =3D credp->fc_mode|S_IFREG; + credp->fc_mode =3D credp->fc_mode | S_IFREG; if (fs_ctx->export_flags & V9FS_SM_MAPPED) { /* Set cleint credentials in xattr */ err =3D local_set_xattrat(dirfd, name, credp); diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 741d222c3f..94df440fc7 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1091,7 +1091,7 @@ static mode_t v9mode_to_mode(uint32_t mode, V9fsStrin= g *extension) } } =20 - if (!(ret&~0777)) { + if (!(ret & ~0777)) { ret |=3D S_IFREG; } =20 @@ -2776,7 +2776,7 @@ static void coroutine_fn v9fs_create(void *opaque) v9fs_path_unlock(s); } else { err =3D v9fs_co_open2(pdu, fidp, &name, -1, - omode_to_uflags(mode)|O_CREAT, perm, &stbuf); + omode_to_uflags(mode) | O_CREAT, perm, &stbuf); if (err < 0) { goto out; } @@ -3428,7 +3428,7 @@ static int v9fs_fill_statfs(V9fsState *s, V9fsPDU *pd= u, struct statfs *stbuf) * compute bsize factor based on host file system block size * and client msize */ - bsize_factor =3D (s->msize - P9_IOHDRSZ)/stbuf->f_bsize; + bsize_factor =3D (s->msize - P9_IOHDRSZ) / stbuf->f_bsize; if (!bsize_factor) { bsize_factor =3D 1; } @@ -3440,9 +3440,9 @@ static int v9fs_fill_statfs(V9fsState *s, V9fsPDU *pd= u, struct statfs *stbuf) * adjust(divide) the number of blocks, free blocks and available * blocks by bsize factor */ - f_blocks =3D stbuf->f_blocks/bsize_factor; - f_bfree =3D stbuf->f_bfree/bsize_factor; - f_bavail =3D stbuf->f_bavail/bsize_factor; + f_blocks =3D stbuf->f_blocks / bsize_factor; + f_bfree =3D stbuf->f_bfree / bsize_factor; + f_bavail =3D stbuf->f_bavail / bsize_factor; f_files =3D stbuf->f_files; f_ffree =3D stbuf->f_ffree; fsid_val =3D (unsigned int) stbuf->f_fsid.__val[0] | @@ -4185,6 +4185,6 @@ static void __attribute__((__constructor__)) v9fs_set= _fd_limit(void) error_report("Failed to get the resource limit"); exit(1); } - open_fd_hw =3D rlim.rlim_cur - MIN(400, rlim.rlim_cur/3); - open_fd_rc =3D rlim.rlim_cur/2; + open_fd_hw =3D rlim.rlim_cur - MIN(400, rlim.rlim_cur / 3); + open_fd_rc =3D rlim.rlim_cur / 2; } --=20 2.20.1