This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/* | |
* IPv6 Neighbor Discovery Protocol | |
* | |
* This is the public header of the n-ndp library, implementing IPv6 Neighbor | |
* Discovery Protocol as described in RFC-4861. This header defines the public | |
* API and all entry points of n-ndp. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 23b39ffc66db836c1d5f895d90188e982ebe512d Mon Sep 17 00:00:00 2001 | |
From: David Herrmann <[email protected]> | |
Date: Tue, 13 Dec 2016 14:49:14 +0100 | |
Subject: [PATCH] bpf-lpm: fixes and tests | |
Fixes 3 things: | |
- Initialize new_node to NULL. Otherwise, the error-path is wrong if | |
we jump there just to unlock the spinlock. | |
- longest_prefix_match() should check for both node->prefixlen and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c | |
index 0ad2c47..e32c590 100644 | |
--- a/drivers/gpu/drm/drm_ioctl.c | |
+++ b/drivers/gpu/drm/drm_ioctl.c | |
@@ -225,6 +225,7 @@ static int drm_getstats(struct drm_device *dev, void *data, | |
*/ | |
static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_priv) | |
{ | |
+ bool is_kms = drm_core_check_feature(dev, DRIVER_MODESET); | |
struct drm_get_cap *req = data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __BUS1_TX_H | |
#define __BUS1_TX_H | |
/* | |
* Copyright (C) 2013-2016 Red Hat, Inc. | |
* | |
* 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; either version 2.1 of the License, or (at | |
* your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int bus1_peer_transfer(struct bus1_peer *src, | |
struct bus1_peer *dst, | |
struct bus1_cmd_handle_transfer *param) | |
{ | |
struct bus1_handle *src_h, *dst_h; | |
int r = 0; | |
mutex_lock(&src->local.lock); | |
src_h = bus1_handle_ref_by_id(src, param.src_handle); | |
if (src_h) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/*** | |
This file is part of bus1. See COPYING for details. | |
bus1 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; either version 2.1 of the License, or | |
(at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/*** | |
This file is part of bus1. See COPYING for details. | |
bus1 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; either version 2.1 of the License, or | |
(at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/*** | |
This file is part of bus1. See COPYING for details. | |
bus1 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; either version 2.1 of the License, or | |
(at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _UAPI_LINUX_BUS1_H | |
#define _UAPI_LINUX_BUS1_H | |
/* | |
* Copyright (C) 2013-2016 Red Hat, Inc. | |
* | |
* bus1 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; either version 2.1 of the License, or (at | |
* your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
static int pi_1(int idx) { | |
int sq, sq2; | |
sq = floor(sqrt(idx)); | |
sq2 = sq * sq; |