/* * Copyright (C) 2010 Red Hat Inc, Steven Rostedt * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License (not later!) * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, see * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ #include #include #include #include "event-parse.h" #define MINORBITS 20 #define MINORMASK ((1U << MINORBITS) - 1) #define MAJOR(dev) ((unsigned int) ((dev) >> MINORBITS)) #define MINOR(dev) ((unsigned int) ((dev) & MINORMASK)) static unsigned long long process_jbd2_dev_to_name(struct trace_seq *s, unsigned long long *args) { unsigned int dev = args[0]; trace_seq_printf(s, "%d:%d", MAJOR(dev), MINOR(dev)); return 0; } static unsigned long long process_jiffies_to_msecs(struct trace_seq *s, unsigned long long *args) { unsigned long long jiffies = args[0]; trace_seq_printf(s, "%lld", jiffies); return jiffies; } int PEVENT_PLUGIN_LOADER(struct pevent *pevent) { pevent_register_print_function(pevent, process_jbd2_dev_to_name, PEVENT_FUNC_ARG_STRING, "jbd2_dev_to_name", PEVENT_FUNC_ARG_INT, PEVENT_FUNC_ARG_VOID); pevent_register_print_function(pevent, process_jiffies_to_msecs, PEVENT_FUNC_ARG_LONG, "jiffies_to_msecs", PEVENT_FUNC_ARG_LONG, PEVENT_FUNC_ARG_VOID); return 0; } void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) { pevent_unregister_print_function(pevent, process_jbd2_dev_to_name, "jbd2_dev_to_name"); pevent_unregister_print_function(pevent, process_jiffies_to_msecs, "jiffies_to_msecs"); } ass='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/lapb/lapb_subr.c'>
ext:
AgeCommit message (Expand)AuthorFilesLines
space:
mode:
authorVincent <vincent.stehle@laposte.net>2017-01-30 15:06:43 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-31 13:07:40 -0500
commitc73e44269369e936165f0f9b61f1f09a11dae01c (patch)
treee2188e900ba06302f8ed2746cb07edd3efbc5c35 /sound/hda/hdac_stream.c
parent040587af31228d82c52267f717c9fcdb65f36335 (diff)
net: thunderx: avoid dereferencing xcv when NULL
This fixes the following smatch and coccinelle warnings: drivers/net/ethernet/cavium/thunder/thunder_xcv.c:119 xcv_setup_link() error: we previously assumed 'xcv' could be null (see line 118) [smatch] drivers/net/ethernet/cavium/thunder/thunder_xcv.c:119:16-20: ERROR: xcv is NULL but dereferenced. [coccinelle] Fixes: 6465859aba1e66a5 ("net: thunderx: Add RGMII interface type support") Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> Cc: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'sound/hda/hdac_stream.c')