From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BC0EC432C3 for ; Fri, 15 Nov 2019 14:33:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 39CEE2073A for ; Fri, 15 Nov 2019 14:33:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573828437; bh=mF87Nl6gED2r2qJHxN4WWU1Jb6PLM4yh2d+dwZW5Hk8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-ID:From; b=O3M0Q4BgmquzNda+0gvRxMuAt24BdPWLuc9HL/FhqTfeprsEjONE8upWr/Qy5fAoC 36dxZcdCfsrHNZFWFwawmfVa9uk0NZbzK3Y43bJmJWwq8re1GT1ssXYAUW8VUn10yt vo1FNw1UvKbUgRz+1+A1Ke3rmEn61HkCs9Pmie/0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727704AbfKOOd4 (ORCPT ); Fri, 15 Nov 2019 09:33:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:50026 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727526AbfKOOd4 (ORCPT ); Fri, 15 Nov 2019 09:33:56 -0500 Received: from [192.168.1.20] (cpe-24-28-70-126.austin.res.rr.com [24.28.70.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E6E620733; Fri, 15 Nov 2019 14:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573828435; bh=mF87Nl6gED2r2qJHxN4WWU1Jb6PLM4yh2d+dwZW5Hk8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Vvc8P1N2l/zeirxvFEhap3H1A3jDhl2uKzyj33rEKW2rwdgj5T8pzOsDy4fw1UWub XOWWlOSXPH1wP5r87NRbpax/A2wzVHEpPawa5nMHZ+KwvkJODp0QrvuDT4Y1ONRqcu eG/BLYr6FtmyUe4Co3Y8nzyrcQUTocfk9sbUsS/M= Subject: Re: [PATCH v4 45/47] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K To: Rasmus Villemoes Cc: Qiang Zhao , Li Yang , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , lkml , Scott Wood , netdev References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> <20191108130123.6839-46-linux@rasmusvillemoes.dk> <79101f00-e3ff-9dd0-7a05-760f8be1ff69@rasmusvillemoes.dk> From: Timur Tabi Message-ID: <3db19b28-90a4-f204-07b3-517cfd44010b@kernel.org> Date: Fri, 15 Nov 2019 08:33:52 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <79101f00-e3ff-9dd0-7a05-760f8be1ff69@rasmusvillemoes.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/15/19 1:44 AM, Rasmus Villemoes wrote: > I can change it, sure, but it's a matter of taste. To me the above asks > "does the value change when it is truncated to a u16" which makes > perfect sense when the value is next used with iowrite16be(). Using a > comparison to U16_MAX takes more brain cycles for me, because I have to > think whether it should be > or >=, and are there some > signedness/integer promotion business interfering with that test. Ok. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91CBCC432C3 for ; Fri, 15 Nov 2019 14:38:29 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (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 40A792073A for ; Fri, 15 Nov 2019 14:38:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Vvc8P1N2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 40A792073A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47F1Dg2VNtzF54j for ; Sat, 16 Nov 2019 01:38:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=timur@kernel.org; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="Vvc8P1N2"; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47F17T4RxNzF7Sv for ; Sat, 16 Nov 2019 01:33:57 +1100 (AEDT) Received: from [192.168.1.20] (cpe-24-28-70-126.austin.res.rr.com [24.28.70.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E6E620733; Fri, 15 Nov 2019 14:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573828435; bh=mF87Nl6gED2r2qJHxN4WWU1Jb6PLM4yh2d+dwZW5Hk8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Vvc8P1N2l/zeirxvFEhap3H1A3jDhl2uKzyj33rEKW2rwdgj5T8pzOsDy4fw1UWub XOWWlOSXPH1wP5r87NRbpax/A2wzVHEpPawa5nMHZ+KwvkJODp0QrvuDT4Y1ONRqcu eG/BLYr6FtmyUe4Co3Y8nzyrcQUTocfk9sbUsS/M= Subject: Re: [PATCH v4 45/47] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K To: Rasmus Villemoes References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> <20191108130123.6839-46-linux@rasmusvillemoes.dk> <79101f00-e3ff-9dd0-7a05-760f8be1ff69@rasmusvillemoes.dk> From: Timur Tabi Message-ID: <3db19b28-90a4-f204-07b3-517cfd44010b@kernel.org> Date: Fri, 15 Nov 2019 08:33:52 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <79101f00-e3ff-9dd0-7a05-760f8be1ff69@rasmusvillemoes.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev , lkml , Li Yang , Scott Wood , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , Qiang Zhao Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 11/15/19 1:44 AM, Rasmus Villemoes wrote: > I can change it, sure, but it's a matter of taste. To me the above asks > "does the value change when it is truncated to a u16" which makes > perfect sense when the value is next used with iowrite16be(). Using a > comparison to U16_MAX takes more brain cycles for me, because I have to > think whether it should be > or >=, and are there some > signedness/integer promotion business interfering with that test. Ok. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BB1AC43141 for ; Fri, 15 Nov 2019 14:33:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 717FF2073B for ; Fri, 15 Nov 2019 14:33:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gXBrPOZR"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Vvc8P1N2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 717FF2073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZKacGlLDvqdRHc8PRKH/n0mgarGKq1nbb2Nx7E95+hA=; b=gXBrPOZRpOaF+xyy1uAE5vJu6 r7TYuC0aemDr/FM29LGRr86clQ8DX28wxUrQahN8h0TEXa0+AjIujROjq9vpRxS7Efu6hmtLu/eXD MXpDkcTEh/gM/EmzJlPwuH/zPALh7KAYA9fpen3Hzi3KhVXFvUD1w0z5g/Sd+lBv7rHWBTUV6wcdD n+42YRIX1HXpfmTj2r3nlNLzxLKPb0H+nHT7Ecx71XkTd/hdR+bd0G2V+RC3FXpNk2zduOlTXdm9b JkeemcE2CVVZKC3Sg0IcRRly9tvAOu1Q5odtN8yKf561vRf4v4Y5cLZdEd18gNxw5VLaCVqlEXxEJ YfN0WdIXw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVcfd-0002uo-Rx; Fri, 15 Nov 2019 14:33:57 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVcfb-0002uF-Nh for linux-arm-kernel@lists.infradead.org; Fri, 15 Nov 2019 14:33:56 +0000 Received: from [192.168.1.20] (cpe-24-28-70-126.austin.res.rr.com [24.28.70.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E6E620733; Fri, 15 Nov 2019 14:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573828435; bh=mF87Nl6gED2r2qJHxN4WWU1Jb6PLM4yh2d+dwZW5Hk8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Vvc8P1N2l/zeirxvFEhap3H1A3jDhl2uKzyj33rEKW2rwdgj5T8pzOsDy4fw1UWub XOWWlOSXPH1wP5r87NRbpax/A2wzVHEpPawa5nMHZ+KwvkJODp0QrvuDT4Y1ONRqcu eG/BLYr6FtmyUe4Co3Y8nzyrcQUTocfk9sbUsS/M= Subject: Re: [PATCH v4 45/47] net/wan/fsl_ucc_hdlc: reject muram offsets above 64K To: Rasmus Villemoes References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> <20191108130123.6839-46-linux@rasmusvillemoes.dk> <79101f00-e3ff-9dd0-7a05-760f8be1ff69@rasmusvillemoes.dk> From: Timur Tabi Message-ID: <3db19b28-90a4-f204-07b3-517cfd44010b@kernel.org> Date: Fri, 15 Nov 2019 08:33:52 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <79101f00-e3ff-9dd0-7a05-760f8be1ff69@rasmusvillemoes.dk> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191115_063355_789627_2B30D65C X-CRM114-Status: GOOD ( 13.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christophe Leroy , netdev , lkml , Li Yang , Scott Wood , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , Qiang Zhao Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/15/19 1:44 AM, Rasmus Villemoes wrote: > I can change it, sure, but it's a matter of taste. To me the above asks > "does the value change when it is truncated to a u16" which makes > perfect sense when the value is next used with iowrite16be(). Using a > comparison to U16_MAX takes more brain cycles for me, because I have to > think whether it should be > or >=, and are there some > signedness/integer promotion business interfering with that test. Ok. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel