From patchwork Tue Jul 28 20:16:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Michelson X-Patchwork-Id: 1338008 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BHpIwtHp; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BGSmF2Klbz9sTR for ; Wed, 29 Jul 2020 06:23:09 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3987185B81; Tue, 28 Jul 2020 20:23:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fjtNiuVkGE4R; Tue, 28 Jul 2020 20:23:06 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9EFD385B11; Tue, 28 Jul 2020 20:23:06 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7DD30C0050; Tue, 28 Jul 2020 20:23:06 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 66030C004D for ; Tue, 28 Jul 2020 20:23:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5096A204F1 for ; Tue, 28 Jul 2020 20:23:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aUhdQg2iyRes for ; Tue, 28 Jul 2020 20:23:04 +0000 (UTC) X-Greylist: delayed 00:06:31 by SQLgrey-1.7.6 Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [216.205.24.74]) by silver.osuosl.org (Postfix) with ESMTPS id DA5971FDFB for ; Tue, 28 Jul 2020 20:23:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595967782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VUjKjGyLw/WENVtjTeQKvY1bu2MhdPBM0bu5rYUU1gg=; b=BHpIwtHpefbTMZ7eZg97LvgWedq5sBg6RnuVYQWJnYaaWhI58VN5EHnbj92mjpuLp3TbfL aXvG2y10dku1Tr6hVOl1GKheXI0ZNdn5Xc2DKLigcRXmK3wcLZ+Pj6L6kz+49bIwV+gy90 HO6e8flEej7gTzBk5HxF+VP7IR5Hers= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-492-XqQm-56JOk6hpJToxnTjng-1; Tue, 28 Jul 2020 16:16:29 -0400 X-MC-Unique: XqQm-56JOk6hpJToxnTjng-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 423D9800688 for ; Tue, 28 Jul 2020 20:16:28 +0000 (UTC) Received: from monae.redhat.com (ovpn-115-56.rdu2.redhat.com [10.10.115.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id EBF561002388 for ; Tue, 28 Jul 2020 20:16:27 +0000 (UTC) From: Mark Michelson To: dev@openvswitch.org Date: Tue, 28 Jul 2020 16:16:23 -0400 Message-Id: <20200728201626.3975541-3-mmichels@redhat.com> In-Reply-To: <20200728201626.3975541-1-mmichels@redhat.com> References: <20200728201626.3975541-1-mmichels@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn v4 2/5] Don't check for writeability of rhs during assignment. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The only condition under which the right-hand side of an assignment needs to be checked for writeability is if it is an exchange (<->) operation. Signed-off-by: Mark Michelson --- lib/actions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/actions.c b/lib/actions.c index e14907e3d..b423995c3 100644 --- a/lib/actions.c +++ b/lib/actions.c @@ -515,7 +515,7 @@ parse_assignment_action(struct action_context *ctx, bool exchange, char *error = expr_type_check(lhs, lhs->n_bits, true); if (!error) { - error = expr_type_check(&rhs, rhs.n_bits, true); + error = expr_type_check(&rhs, rhs.n_bits, exchange); } if (error) { lexer_error(ctx->lexer, "%s", error);