Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163709AbdDXAX3 (ORCPT ); Sun, 23 Apr 2017 20:23:29 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35263 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163687AbdDXAXV (ORCPT ); Sun, 23 Apr 2017 20:23:21 -0400 From: Karim Eshapa To: davem@davemloft.net Cc: tremyfr@gmail.com, a@unstable.cc, fw@strlen.de, clabbe.montjoie@gmail.com, edumazet@google.com, jarod@redhat.com, adi-buildroot-devel@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Karim Eshapa Subject: RE:drivers:net:ethernet:adi:bfin_mac: Use FIELD_SIZEOF defined kernel macro Date: Mon, 24 Apr 2017 02:23:10 +0200 Message-Id: <1492993390-10064-1-git-send-email-karim.eshapa@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492970524-12607-1-git-send-email-karim.eshapa@gmail.com> References: <1492970524-12607-1-git-send-email-karim.eshapa@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 591 Lines: 17 On Sun, 23 Apr 2017 22:56:38 +0200, Geert Uytterhoeven: >IMHO this makes the code less safe and less future-proof. >What if the type of info is ever changed? >There's no safety check to validate that the FIELD_SIZEOF() operates on the >same data as the strlcpy() destination. Really make sense :) >As the kbuild test robot already told you, this doesn't compile. >Please try to (at least) compile the code before sending patches. >Thanks! So sorry for that I built quickly using the wrong compiler and the wrong target machine with my old .config that's horrible :) Thanks a lot, Karim