Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp890496imu; Mon, 5 Nov 2018 10:17:08 -0800 (PST) X-Google-Smtp-Source: AJdET5cb74B/Obw5hifx5lEcI4HcfPhxKpuB+/Uo5Gadkn49fa4xxo0miFwpJ4y8+DfZS6kMrU6G X-Received: by 2002:a17:902:104:: with SMTP id 4-v6mr13951098plb.184.1541441828221; Mon, 05 Nov 2018 10:17:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541441828; cv=none; d=google.com; s=arc-20160816; b=FcSTzy5/21fTamJpITY+KVlfKJlwsFMmad8PbwxvFb9rXdzvg+X8qBfSAVmudzU/uz d4JpOySgrGiXUTthdvjW31nGFUWbTkWrNxW/Y881eZeKl7z+gsxx0z2rUOR0ib4wN1sh qAyJ7Gn8/is9xLaCuBWUxO3T4jaYlEHw5BYKJ8zrIh0YweK4h7UISOyQZTmCI3/QJfRQ mlhd4Ax+aeAUSTxJlzpS21HsLyMj/bAyVqmqY7C4xeN5UPEJX3Vk+itBV5ph0XTGjhlS N9LOIdJElNouM1/FeV12EyqmGGNduCP6tfjs+eytGFHTkArJ7bp0oeHgwD2HXye0KgTV cpBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=yN1jmi+0ts3QbkiEgtT6Yoek9elyfEhajnS46w8MNM4=; b=JQTF12nC+iCsEw+gZAMli66TayX8pzPM6OsFSgGKs8XCTcmZ5m/HWkuzIcQ5ZRJ5Fd 6r9S59KPjv1Ir87tfWDbP07yR8g83QRGnVcVLT+JTxYvnXSKPic1n/M379YrF/CtP/qN pvrxM2tcqWkuWQN/4eiKR3PR/hZNW8fJxcW44LUbgq0xKP6de3Y9uo0lg/8p54LHSjZX eCDDv+Hz6uKwmQHHq6/ESNXvE9tQiQ6Dn5gpq4qY5FMLQjyJV6WL4x/8WOuPNqeTmpyw zI39H5GJr9h84ea49r710HKBi9JydT8sd+mJkNLtisU086CDUTu1ToxIxNYttuNV/5yN XWYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10-v6si46856351pfk.252.2018.11.05.10.16.51; Mon, 05 Nov 2018 10:17:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387875AbeKFDhE (ORCPT + 99 others); Mon, 5 Nov 2018 22:37:04 -0500 Received: from shards.monkeyblade.net ([23.128.96.9]:59586 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387561AbeKFDhE (ORCPT ); Mon, 5 Nov 2018 22:37:04 -0500 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::cf9]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 0CCBB144A04B9; Mon, 5 Nov 2018 10:16:11 -0800 (PST) Date: Mon, 05 Nov 2018 10:16:10 -0800 (PST) Message-Id: <20181105.101610.1437737564548154497.davem@davemloft.net> To: starnight@g.ncu.edu.tw Cc: afaerber@suse.de, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, marcel@holtmann.org, dollar.chen@wtmec.com, ken.yu@rakwireless.com, linux-wpan@vger.kernel.org, stefan@datenfreihafen.org Subject: Re: [PATCH V2 2/7] net: lorawan: Add LoRaWAN socket module From: David Miller In-Reply-To: <20181105165544.5215-3-starnight@g.ncu.edu.tw> References: <20181105165544.5215-3-starnight@g.ncu.edu.tw> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 05 Nov 2018 10:16:11 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jian-Hong Pan Date: Tue, 6 Nov 2018 00:55:40 +0800 > +static inline struct lrw_mac_cb * mac_cb(struct sk_buff *skb) "mac_cb()" is pretty generic for a name, and leads to namespace pollution, please use lrw_mac_cb() or similar. > +static inline struct dgram_sock * > +dgram_sk(const struct sock *sk) > +{ > + return container_of(sk, struct dgram_sock, sk); > +} > + > +static inline struct net_device * > +lrw_get_dev_by_addr(struct net *net, u32 devaddr) Never use inline for functions in a foo.c file, let the compiler decide. > +{ > + struct net_device *ndev = NULL; > + __be32 be_addr = cpu_to_be32(devaddr); Always order local variables from longest to shortest line. > +static int > +dgram_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, > + int noblock, int flags, int *addr_len) > +{ > + struct sk_buff *skb; > + size_t copied = 0; > + DECLARE_SOCKADDR(struct sockaddr_lorawan *, saddr, msg->msg_name); > + int err; Likewise. I'm not going to point out every single place where you have made these two errors. Please audit your entire submission and fix the problems wherever they occur. Thank you.