Conversions2.c

Conversions2.c

Converts Celsius to Fahrenheight, improved version of Conversions.c

error: pathspec 'conversions2.c' did not match any file(s) known to git

--- conversions2.c
+++ conversions2.c
@@ -0,0 +1,49 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+//Conversions2.c [Shane Roeseberg]
+//Converts Celsius to Fahrenheight
+//Improved version of Conversions.c
+
+#define BUFFER_SIZE 0x20
+
+int main(int argc, char **argv)
+{
+	char buffer [BUFFER_SIZE];
+	char *exitword = "stop";
+	float celsius, fahrenheit;
+
+	while (0x01)
+	{
+		memset(buffer, 0x00, BUFFER_SIZE);
+		printf("\n");
+		printf("Type 'stop' at any point to exit the program.");
+		printf("\n");
+		printf("Please input a temperature in Celsius (type '%s' to stop): ", exitword);
+
+		if(fgets(buffer, BUFFER_SIZE - 0x01, stdin) == NULL)
+		{
+			fprintf(stderr, "Unable to read user input\n");
+			fprintf(stderr, "Please try again\n");
+			continue;
+		}
+
+		if(strncmp (buffer, exitword, strlen (exitword)) == 0x00)
+		{
+			printf("Good bye!\n");
+			printf("\n");
+			break;
+		}
+
+		if((celsius = strtof(buffer, NULL)) == 0)
+		{
+			fprintf(stderr, "Unable to convert user input to floating point number.\n");
+			fprintf(stderr, "Please try again,\n");
+			continue;
+		}
+		fahrenheit = (1.8 * celsius) + 32;
+		printf("temperature in Fahrenheit: %f\n", fahrenheit);
+	}
+
+	return EXIT_SUCCESS;
+}


Use gtk_icon_info_load_symbolic_for_context

gtk_icon_info_load_symbolic_for_style is going to be deprecated.

--- gtk/gtkcellrendererpixbuf.c
+++ gtk/gtkcellrendererpixbuf.c
@@ -533,14 +533,13 @@

   if (info)
     {
-      GtkStyle *style;
-
-      style = gtk_widget_get_style (GTK_WIDGET (widget));
-      priv->pixbuf = gtk_icon_info_load_symbolic_for_style (info,
-                                                            style,
-                                                            GTK_STATE_NORMAL,
-                                                            NULL,
-                                                            NULL);
+      GtkStyleContext *context;
+
+      context = gtk_widget_get_style_context (GTK_WIDGET (widget));
+      priv->pixbuf = gtk_icon_info_load_symbolic_for_context (info,
+                                                              context,
+                                                              NULL,
+                                                              NULL);
       gtk_icon_info_free (info);
     }

@@ -603,12 +602,13 @@

   if (info)
     {
-      GtkStyle *style;
-
-      style = gtk_widget_get_style (GTK_WIDGET (widget));
-      pixbuf = gtk_icon_info_load_symbolic_for_style (info,
-                                                      style, state,
-                                                      NULL, NULL);
+      GtkStyleContext *context;
+
+      context = gtk_widget_get_style_context (GTK_WIDGET (widget));
+      pixbuf = gtk_icon_info_load_symbolic_for_context (info,
+                                                        context,
+                                                        NULL,
+                                                        NULL);
       gtk_icon_info_free (info);
       return pixbuf;
     }


ipvs: Fix unused label warning

ipvs: Fix unused label warning

Signed-off-by: Sven Wegener <18dc2ed701c57df81c0b5498c13767c232eb398f@stealer.net>
Signed-off-by: Simon Horman <a105fd58f578dea0be108941d4c59d15396e1855@verge.net.au>

--- net/ipv4/ipvs/ip_vs_ctl.c
+++ net/ipv4/ipvs/ip_vs_ctl.c
@@ -1330,7 +1330,9 @@

   out_unlock:
 	write_unlock_bh(&__ip_vs_svc_lock);
+#ifdef CONFIG_IP_VS_IPV6
   out:
+#endif

 	if (old_sched)
 		ip_vs_scheduler_put(old_sched);


virDomainNetDefParseXML: Refactor parsing of <target> subelement

Specifically rework of parsing of the 'managed' attribute simplifies the
code greatly.

Signed-off-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>
Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

--- src/conf/domain_conf.c
+++ src/conf/domain_conf.c
@@ -8994,12 +8994,12 @@
     xmlNodePtr vlan_node = NULL;
     xmlNodePtr bandwidth_node = NULL;
     xmlNodePtr mac_node = NULL;
+    xmlNodePtr target_node = NULL;
     g_autoptr(GHashTable) filterparams = NULL;
     VIR_XPATH_NODE_AUTORESTORE(ctxt)
     int rv;
     g_autofree char *macaddr = NULL;
     g_autofree char *dev = NULL;
-    g_autofree char *managed_tap = NULL;
     g_autofree char *model = NULL;
     g_autofree char *filter = NULL;
     g_autofree char *linkstate = NULL;
@@ -9282,8 +9282,13 @@
             return NULL;
     }

-    def->ifname = virXPathString("string(./target/@dev)", ctxt);
-    managed_tap = virXPathString("string(./target/@managed)", ctxt);
+    if ((target_node = virXPathNode("./target", ctxt))) {
+        def->ifname = virXMLPropString(target_node, "dev");
+
+        if (virXMLPropTristateBool(target_node, "managed", VIR_XML_PROP_NONE,
+                                   &def->managed_tap) < 0)
+            return NULL;
+    }

     def->ifname_guest = virXPathString("string(./guest/@dev)", ctxt);
     def->ifname_guest_actual = virXPathString("string(./guest/@actual)", ctxt);
@@ -9350,17 +9355,6 @@
     if (virDomainNetIPInfoParseXML(_("guest interface"), node,
                                    ctxt, &def->guestIP) < 0)
         return NULL;
-
-    if (managed_tap) {
-        bool state = false;
-        if (virStringParseYesNo(managed_tap, &state) < 0) {
-            virReportError(VIR_ERR_XML_ERROR,
-                           _("invalid 'managed' value '%s'"),
-                           managed_tap);
-            return NULL;
-        }
-        def->managed_tap = virTristateBoolFromBool(state);
-    }

     if (def->managed_tap != VIR_TRISTATE_BOOL_NO && def->ifname &&
         (flags & VIR_DOMAIN_DEF_PARSE_INACTIVE) &&


Add Cogl::Path, Cogl.get_path, Cogl.set_path

--- clutter/rbcoglprimitives.c
+++ clutter/rbcoglprimitives.c
@@ -312,31 +312,31 @@
 static VALUE
 rb_cogl_get_path (VALUE self)
 {
-  rb_raise (rb_eNotImpError, "get_path unimplemented");
-  return Qnil;
+  return rb_cogl_handle_to_value ((CoglHandle *) cogl_get_path ());
 }

 static VALUE
 rb_cogl_set_path (VALUE self, VALUE path)
 {
-  rb_raise (rb_eNotImpError, "set_path unimplemented");
-  return self;
-}
-
-static VALUE
-rb_cogl_path_copy (VALUE self)
-{
-  rb_raise (rb_eNotImpError, "path_copy unimplemented");
-  return Qnil;
+  cogl_set_path ((CoglPath *) rb_cogl_handle_get_handle (path));
+  return Qnil;
+}
+
+static VALUE
+rb_cogl_path_dup (VALUE self)
+{
+  CoglPath *src = (CoglPath *) rb_cogl_handle_get_handle (self);
+  CoglPath *dst = cogl_path_copy (src);
+
+  return rb_cogl_handle_get_handle (dst);
 }

 static void
 rb_cogl_path_init ()
 {
   VALUE klass = rb_cogl_define_handle (cogl_is_path, "Path");
-  rb_define_method(klass, "dup", rb_cogl_path_copy, 0);
-}
-
+  rb_define_method(klass, "dup", rb_cogl_path_dup, 0);
+}

 void
 rb_cogl_primitives_init ()


* fixed #533: WarpPointRigid missing EIGEN_MAKE_ALIGNED_OPERATOR_NEW (thanks Radoslaw!)

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@3986 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- registration/include/pcl/registration/warp_point_rigid.h
+++ registration/include/pcl/registration/warp_point_rigid.h
@@ -56,19 +56,25 @@

     virtual ~WarpPointRigid () {};

-    virtual void setParam (const Eigen::VectorXf& p) = 0;
+    virtual void
+    setParam (const Eigen::VectorXf& p) = 0;

-    void warpPoint (const PointSourceT& pnt_in, PointSourceT& pnt_out) const
+    void
+    warpPoint (const PointSourceT& pnt_in, PointSourceT& pnt_out) const
     {
       pnt_out.getVector3fMap () = transform_matrix_.topLeftCorner<3, 3> () * pnt_in.getVector3fMap() +
         transform_matrix_.block<3,1> (0, 3);
       pnt_out.data [3] = pnt_in.data [3];
     }

-    int getDimension () const {return nr_dim_;}
+    int
+    getDimension () const {return nr_dim_;}

-    const Eigen::Matrix4f& getTransform () const { return transform_matrix_; }
+    const Eigen::Matrix4f&
+    getTransform () const { return transform_matrix_; }

+  public:
+    EIGEN_MAKE_ALIGNED_OPERATOR_NEW

   protected:
     int nr_dim_;


attempt at printks2

attempt at printks2

--- Opcodes/pan2.c
+++ Opcodes/pan2.c
@@ -112,9 +112,44 @@
     return OK;
 }

+typedef struct {
+        OPDS    h;
+        MYFLT   *iformat;
+        MYFLT   *val;
+        MYFLT   oldvalue;
+        char    *sarg;
+} PRINTK3;
+
+
+int printk3set(CSOUND *csound, PRINTK3 *p)
+{
+    p->oldvalue = FL(-1.12123e35);  /* hack to force printing first value */
+    p->sarg = ((STRINGDAT*)p->iformat)->data;
+    return OK;
+}
+
+int printk3(CSOUND *csound, PRINTK3 *p)
+{
+    MYFLT   value = *p->val;
+
+    if (p->oldvalue != value) {
+      char buff[1024];
+      MYFLT *vv[1];
+      vv[0] = &value;
+      buff[0] = '\0';
+      sprints(buff, p->sarg, vv, 1);
+      csound->MessageS(csound, CSOUNDMSG_ORCH, buff);
+      p->oldvalue = value;
+    }
+    //else printf("....%f %f\n", p->oldvalue, value);
+    return OK;
+}
+
+
 static OENTRY pan2_localops[] =
 {
-  { "pan2", sizeof(PAN2), 0, 5, "aa", "axo", (SUBR) pan2set, 0, (SUBR) pan2run }
+  { "pan2", sizeof(PAN2), 0, 5, "aa", "axo", (SUBR) pan2set, 0, (SUBR) pan2run },
+  { "printks2", sizeof(PRINTK3),0, 3, "", "Sk", (SUBR)printk3set, (SUBR)printk3 }
 };

 LINKAGE_BUILTIN(pan2_localops)


Present error dialogs from the places sidebar

--- gtk/gtkfilechooserdefault.c
+++ gtk/gtkfilechooserdefault.c
@@ -3773,6 +3773,16 @@
   change_folder_and_display_error (impl, location, clear_entry);
 }

+/* Callback used when the places sidebar needs us to display an error message */
+static void
+places_sidebar_show_error_message_cb (GtkPlacesSidebar *sidebar,
+				      const char       *primary,
+				      const char       *secondary,
+				      GtkFileChooserDefault *impl)
+{
+  error_message (impl, primary, secondary);
+}
+
 /* Creates the widgets for the shortcuts/bookmarks pane */
 static GtkWidget *
 shortcuts_pane_create (GtkFileChooserDefault *impl,
@@ -3782,6 +3792,9 @@

   g_signal_connect (impl->places_sidebar, "location-selected",
 		    G_CALLBACK (places_sidebar_location_selected_cb),
+		    impl);
+  g_signal_connect (impl->places_sidebar, "show-error-message",
+		    G_CALLBACK (places_sidebar_show_error_message_cb),
 		    impl);

   return impl->places_sidebar;


Return 0 if mmap is already done

Return 0 if mmap is already done

--- src/arm/raspberry_pi.c
+++ src/arm/raspberry_pi.c
@@ -159,7 +159,7 @@
 {
     // Already mapped!
     if (clk_reg || gpio_reg || pwm_reg) {
-        return;
+        return 0;
     }

     clk_reg = mmap_reg_addr(peripheral_base + CLOCK_OFFSET);


FIX: Fix for Borland compiler.

FIX: Fix for Borland compiler.

--- Code/Algorithms/itkCannySegmentationLevelSetImageFilter.h
+++ Code/Algorithms/itkCannySegmentationLevelSetImageFilter.h
@@ -127,7 +127,8 @@
           class TFeatureImage,
           class TOutputPixelType = float>
 class ITK_EXPORT CannySegmentationLevelSetImageFilter
-  : public SegmentationLevelSetImageFilter<TInputImage, TFeatureImage, TOutputPixelType>
+  : public SegmentationLevelSetImageFilter<TInputImage, TFeatureImage, TOutputPixelType,
+                                      Image<TOutputPixelType, ::itk::GetImageDimension<TInputImage>::ImageDimension> >
 {
 public:
    /** Standard class typedefs */


(log0recv.c:2905) Bug#55227 Fix compiler warnings in innodb with gcc 4.6

--- storage/innobase/log/log0recv.c
+++ storage/innobase/log/log0recv.c
@@ -2902,7 +2902,9 @@
 	ib_uint64_t	old_scanned_lsn;
 	ib_uint64_t	group_scanned_lsn;
 	ib_uint64_t	contiguous_lsn;
+#ifdef UNIV_LOG_ARCHIVE
 	ib_uint64_t	archived_lsn;
+#endif /* UNIV_LOG_ARCHIVE */
 	byte*		buf;
 	byte		log_hdr_buf[LOG_FILE_HDR_SIZE];
 	ulint		err;
@@ -2957,7 +2959,9 @@

 	checkpoint_lsn = mach_read_from_8(buf + LOG_CHECKPOINT_LSN);
 	checkpoint_no = mach_read_from_8(buf + LOG_CHECKPOINT_NO);
+#ifdef UNIV_LOG_ARCHIVE
 	archived_lsn = mach_read_from_8(buf + LOG_CHECKPOINT_ARCHIVED_LSN);
+#endif /* UNIV_LOG_ARCHIVE */

 	/* Read the first log file header to print a note if this is
 	a recovery from a restored InnoDB Hot Backup */


Return error, don't crash, on allocation failure

As previously noted, when cl_mem_allocate fails, its error handling
then calls cl_mem_delete on the incompletely-set-up buffer, which
aborts at assert(mem->ctx).

This patch appears to fix the problem, but be warned I don't know this
code well enough to know what else it might break.

Signed-off-by: Rebecca Palmer <2decb937e7eca5e941ec22bc308fd452fe4ab2bb@zoho.com>
Reviewed-by: Zhigang Gong <e04a7b9b70b1e4c6318cf117dcd1a9056e14b97a@linux.intel.com>

--- src/cl_mem.c
+++ src/cl_mem.c
@@ -1071,16 +1071,19 @@
   }

   /* Remove it from the list */
-  assert(mem->ctx);
-  pthread_mutex_lock(&mem->ctx->buffer_lock);
-    if (mem->prev)
-      mem->prev->next = mem->next;
-    if (mem->next)
-      mem->next->prev = mem->prev;
-    if (mem->ctx->buffers == mem)
-      mem->ctx->buffers = mem->next;
-  pthread_mutex_unlock(&mem->ctx->buffer_lock);
-  cl_context_delete(mem->ctx);
+  if (mem->ctx) {
+    pthread_mutex_lock(&mem->ctx->buffer_lock);
+      if (mem->prev)
+        mem->prev->next = mem->next;
+      if (mem->next)
+        mem->next->prev = mem->prev;
+      if (mem->ctx->buffers == mem)
+        mem->ctx->buffers = mem->next;
+    pthread_mutex_unlock(&mem->ctx->buffer_lock);
+    cl_context_delete(mem->ctx);
+  } else {
+    assert((mem->prev == 0) && (mem->next == 0));
+  }

   /* Someone still mapped, unmap */
   if(mem->map_ref > 0) {


builder: Add some spew before build-init

--- builder/builder-manifest.c
+++ builder/builder-manifest.c
@@ -736,6 +736,8 @@
   g_autoptr(GPtrArray) args = NULL;
   int i;

+  g_print ("Initializing build dir\n");
+
   if (self->id == NULL)
     {
       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,


extern "C"

extern "C"

--- groups/bal/balb/balb_assertiontrackersingleton.h
+++ groups/bal/balb/balb_assertiontrackersingleton.h
@@ -127,6 +127,18 @@
                         // ===============================
                         // class AssertionTrackerSingleton
                         // ===============================
+
+extern "C" {
+typedef void (*AssertionTrackerSingleton_BregCallback)(int *, int *, int *);
+    // This is the type of a callback function that fetches three BREG values.
+    // These are intended to be the ones found in
+    // <bbit/201310/bbit_assert_trace_enable.h>
+    // <bbit/201310/bbit_assert_trace_severity_level.h>
+    // <bbit/201411/bbit_assert_max_callstack_count.h> and represent the legacy
+    // BREG meant to control assertion logging.  (Note that linkage
+    // specifications must appear at namespace scope, forcing the placement of
+    // this declaration.)
+}

 template <class TRACKER>
 class AssertionTrackerSingleton {
@@ -152,13 +164,8 @@
     //:   'int'.
   public:
     // PUBLIC TYPES
-    typedef void (*BregCallback)(int *, int *, int *);
-        // This is the type of a callback function that fetches three BREG
-        // values.  These are intended to be the ones found in
-        //     <bbit/201310/bbit_assert_trace_enable.h>
-        //     <bbit/201310/bbit_assert_trace_severity_level.h>
-        //     <bbit/201411/bbit_assert_max_callstack_count.h>
-        // and represent the legacy BREG meant to control assertion logging.
+    typedef AssertionTrackerSingleton_BregCallback BregCallback;
+        // Incorporate the BREG callback type into the class.

     typedef typename TRACKER::ConfigurationCallback ConfigurationCallback;
         // The type of the configuration callback of the 'TRACKER'.


Remove unwanted cast of DO_GET_REFCNT to long int in qbuffer.c
[Test-built runtime on linux32 (cflbs32) and linux64 (chap02)]

git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@22168 3a8e244f-b0f2-452b-bcba-4c88e055c3ca

--- runtime/src/qio/qbuffer.c
+++ runtime/src/qio/qbuffer.c
@@ -74,7 +74,7 @@
 void debug_print_bytes(qbytes_t* b)
 {
   fprintf(stderr, "bytes %p: data=%p len=%lli ref_cnt=%" PRIu64 " free_function=%p flags=%i\n",
-          b, b->data, (long long int) b->len, (long int) DO_GET_REFCNT(b),
+          b, b->data, (long long int) b->len, DO_GET_REFCNT(b),
           b->free_function, b->flags);
 }


Removing unused arguments to printf.

Removing unused arguments to printf.

git-svn-id: 8f4169f362aa98d77d2b69c890b9cda3cf6a6d2c@548 8e395407-42ff-0310-94d9-ec183df6106f

--- OpenCL/main.c
+++ OpenCL/main.c
@@ -234,10 +234,10 @@

     begin = clock();
     for (i = 1; i <= iterations; i++) {
-        printf(".", i);
+        printf(".");
         func(input_volume, warpfield, output_volume);
     }
-    printf("\n", i);
+    printf("\n");
     end = clock();

     secondsPerIteration = ((double)(end - begin)) / CLOCKS_PER_SEC / iterations;


Setting title_ so it gets printed...

Setting title_ so it gets printed...

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@1435 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- common/include/pcl/common/time.h
+++ common/include/pcl/common/time.h
@@ -62,6 +62,7 @@
       inline ScopeTime (const char* title)
       {
         start_time_ = boost::posix_time::second_clock::local_time();
+        title_ = std::string(title);
       }

       inline ~ScopeTime ()


Better error message if UID/GID isn't valid.

--HG--
branch : HEAD

--- src/master/mail-process.c
+++ src/master/mail-process.c
@@ -18,26 +18,26 @@

 static unsigned int mail_process_count = 0;

-static int validate_uid_gid(uid_t uid, gid_t gid)
+static int validate_uid_gid(uid_t uid, gid_t gid, const char *user)
 {
 	if (uid == 0) {
-		i_error("mail process isn't allowed for root");
+		i_error("Logins with UID 0 not permitted (user %s)", user);
 		return FALSE;
 	}

 	if (uid < (uid_t)set->first_valid_uid ||
 	    (set->last_valid_uid != 0 && uid > (uid_t)set->last_valid_uid)) {
-		i_error("mail process isn't allowed to use UID %s "
+		i_error("Logins with UID %s (user %s) not permitted "
 			"(modify first_valid_uid in config file)",
-			dec2str(uid));
+			dec2str(uid), user);
 		return FALSE;
 	}

 	if (gid < (gid_t)set->first_valid_gid ||
 	    (set->last_valid_gid != 0 && gid > (gid_t)set->last_valid_gid)) {
-		i_error("mail process isn't allowed to use primary group ID %s "
-			"with UID %s (see first_valid_gid in config file).",
-			dec2str(gid), dec2str(uid));
+		i_error("Logins for users with primary group ID %s (user %s) "
+			"not permitted (see first_valid_gid in config file).",
+			dec2str(gid), user);
 		return FALSE;
 	}

@@ -111,7 +111,8 @@
 		return FALSE;
 	}

-	if (!validate_uid_gid(reply->uid, reply->gid))
+	if (!validate_uid_gid(reply->uid, reply->gid,
+			      data + reply->virtual_user_idx))
 		return FALSE;

 	home_dir = data + reply->home_idx;


Initialise mDebugLevel

Initialise mDebugLevel

--- Components/Terrain/include/OgreTerrainMaterialGenerator.h
+++ Components/Terrain/include/OgreTerrainMaterialGenerator.h
@@ -186,7 +186,7 @@
 		};

 		TerrainMaterialGenerator()
-			: mActiveProfile(0), mChangeCounter(0) {}
+			: mActiveProfile(0), mChangeCounter(0), mDebugLevel(0) {}
 		virtual ~TerrainMaterialGenerator()
 		{
 			for (ProfileList::iterator i = mProfiles.begin(); i != mProfiles.end(); ++i)


tokudb: configure features, available in mariadb 5.5

--- storage/tokudb/hatoku_defines.h
+++ storage/tokudb/hatoku_defines.h
@@ -139,18 +139,17 @@
 #define TOKU_INCLUDE_OTHER_DB_TYPE 0

 #elif 50500 <= MYSQL_VERSION_ID && MYSQL_VERSION_ID <= 50599
-#define TOKU_INCLUDE_ALTER_56 1
-#define TOKU_INCLUDE_ALTER_55 1
+#define TOKU_INCLUDE_ALTER_56 0         /* MariaDB 5.5 */
+#define TOKU_INCLUDE_ALTER_55 0         /* MariaDB 5.5 */
 #define TOKU_INCLUDE_ROW_TYPE_COMPRESSION 1
 #define TOKU_INCLUDE_XA 1
-#define TOKU_PARTITION_WRITE_FRM_DATA 1
-#define TOKU_INCLUDE_WRITE_FRM_DATA 1
-#define TOKU_INCLUDE_UPSERT 1
+#define TOKU_PARTITION_WRITE_FRM_DATA 0 /* MariaDB 5.5 */
+#define TOKU_INCLUDE_WRITE_FRM_DATA 0   /* MariaDB 5.5 */
+#define TOKU_INCLUDE_UPSERT 0           /* MariaDB 5.5 */
 #if defined(MARIADB_BASE_VERSION)
 #define TOKU_INCLUDE_EXTENDED_KEYS 1
 #endif
-#define TOKU_INCLUDE_OTHER_DB_TYPE 1
-
+#define TOKU_INCLUDE_OTHER_DB_TYPE 0    /* MariaDB 5.5 */
 #else

 #error


client: Fix unmanage : reparent the destroyed client to root for unmanage it

--- src/client.c
+++ src/client.c
@@ -559,7 +559,7 @@

      XGrabServer(dpy);
      XSetErrorHandler(errorhandlerdummy);
-
+     XReparentWindow(dpy, c->win, root, 0, 0);
      /* Unset all focus stuff {{{ */
      if(sel == c)
           client_focus(NULL);


Add a FIXME for plugin_account_manager_set_dbus_daemon()

--- src/mcd-account-manager.c
+++ src/mcd-account-manager.c
@@ -1275,6 +1275,10 @@
     McdAccountManagerPrivate *priv = MCD_ACCOUNT_MANAGER_PRIV (manager);
     McdPluginAccountManager *pa = priv->plugin_manager;

+    /* FIXME: I'm pretty sure we should just move most of the above code out of
+     * _init() to here and then mcd_plugin_account_manager_new() could take the
+     * TpDBusDaemon * as it should and everyone wins.
+     */
     mcd_plugin_account_manager_set_dbus_daemon (pa, priv->dbus_daemon);
 }


Fixed calling convention definitions

Fixed calling convention definitions

The "__stdcall" attribute is only for MSVC compilers.

--- c/code/headers/clib/clib.h
+++ c/code/headers/clib/clib.h
@@ -8,7 +8,11 @@
     #define CLIB_MODULE_VISIBILITY __declspec(dllexport)
 #endif /* defined(_MSC_VER) */

-#define CLIB_CALLING_CONVENTION __stdcall
+#define CLIB_CALLING_CONVENTION
+#if defined(_MSC_VER)
+  #undef CLIB_CALLING_CONVENTION
+  #define CLIB_CALLING_CONVENTION __stdcall
+#endif /* defined(_MSC_VER) */

 #if defined(__cplusplus)
     #define CLIB_API(rt) \


Implement variable quadrature degree.  Make p=4 the default.  Works good.

--- c/ch5/plap.c
+++ c/ch5/plap.c
@@ -1,5 +1,6 @@
-static char help[] = "Solve the p-Laplacian equation in 2D using Q^1 FEM\n"
-"and an objective function.  No Jacobian implementation so run as one of:\n"
+static char help[] = "Solve the p-Laplacian equation in 2D using Q^1 FEM.\n"
+"Implements an objective function and a residual (gradient) function, but\n"
+"no Jacobian.  Defaults to p=4 and quadrature degree n=2.  Run as one of:\n"
 "   ./plap -snes_fd_color\n"
 "   ./plap -snes_fd\n"
 "   ./plap -snes_mf\n"
@@ -10,34 +11,55 @@
 // note diverged linear solve from bad gradient
 // redo with -snes_fd_color to see total success
 // this also tests symmetry and positive-definiteness because use Cholesky
-// for LEV in 0 1 2; do ./plap -plap_p 4 -snes_fd_function -snes_fd -snes_monitor -snes_converged_reason -snes_linesearch_type basic -ksp_type preonly -pc_type cholesky -da_refine $LEV; done
+// for LEV in 0 1 2; do ./plap -snes_fd_function -snes_fd -snes_monitor -snes_converged_reason -snes_linesearch_type basic -ksp_type preonly -pc_type cholesky -da_refine $LEV; done

 // CHECK FINE-GRID SNES CONVERGENCE WITH -snes_fd_color:
-// timer ./plap -plap_p 4 -snes_fd_color -ksp_converged_reason -snes_monitor -snes_converged_reason -ksp_type cg -pc_type icc -da_refine 6
+// timer ./plap -snes_fd_color -ksp_converged_reason -snes_monitor -snes_converged_reason -ksp_type cg -pc_type icc -da_refine 6

 // EVIDENCE OF CONVERGENCE WITH -snes_fd_color AND IN PARALLEL;
 // bt line search fails in parallel?
 // note nonlinear iterations increase with grid
-// for LEV in 0 1 2 3 4 5 6 7; do mpiexec -n 4 ./plap -plap_p 4 -snes_fd_color -snes_linesearch_type basic -ksp_type cg -pc_type bjacobi -sub_pc_type icc -snes_converged_reason -da_refine $LEV; done
+// for LEV in 0 1 2 3 4 5 6 7; do mpiexec -n 4 ./plap -snes_fd_color -snes_linesearch_type basic -ksp_type cg -pc_type bjacobi -sub_pc_type icc -snes_converged_reason -da_refine $LEV; done
+
+// SHOWS n=1 GIVES ROUGH DOUBLE ERROR OVER n=2; n=3 NO BENEFIT:
+// for NN in 1 2 3; do for LEV in 0 2 4 6; do ./plap -snes_fd_color -snes_linesearch_type basic -ksp_type cg -pc_type icc -snes_converged_reason -da_refine $LEV -plap_quaddegree $NN; done; done

 #include <petsc.h>

 #define COMM PETSC_COMM_WORLD

-//STARTDECLARE
+//STARTCTX
 typedef struct {
     DM        da;
     PetscReal p;
+    PetscInt  quaddegree;
     Vec       f,g;
 } PLapCtx;

+PetscErrorCode ConfigureCtx(PLapCtx *user) {
+    PetscErrorCode ierr;
+    user->p = 4.0;
+    user->quaddegree = 2;
+    ierr = PetscOptionsBegin(COMM,"plap_","p-laplacian solver options",""); CHKERRQ(ierr);
+    ierr = PetscOptionsReal("-p","exponent p with  1 <= p < infty",
+                      NULL,user->p,&(user->p),NULL); CHKERRQ(ierr);
+    if (user->p < 1.0) { SETERRQ(COMM,1,"p >= 1 required"); }
+    ierr = PetscOptionsInt("-quaddegree","quadrature degree n (= 1,2,3 only)",
+                     NULL,user->quaddegree,&(user->quaddegree),NULL); CHKERRQ(ierr);
+    if ((user->quaddegree < 1) || (user->quaddegree > 3)) {
+        SETERRQ(COMM,2,"quadrature degree n=1,2,3 only");
+    }
+    ierr = PetscOptionsEnd(); CHKERRQ(ierr);
+    return 0;
+}
+//ENDCTX
+
+//STARTBOUNDARYINITIAL
 PetscReal BoundaryG(PetscReal x, PetscReal y) {
     return 0.5 * (x+1.0)*(x+1.0) * (y+1.0)*(y+1.0);
 }
-//ENDDECLARE
-
-//STARTBOUNDARYINITIAL
+
 PetscErrorCode SetGLocal(DMDALocalInfo *info, Vec g, PLapCtx *user) {
     PetscErrorCode ierr;
     const PetscReal hx = 1.0 / (info->mx+1), hy = 1.0 / (info->my+1);
@@ -113,9 +135,6 @@
 //ENDEXACT

 //STARTFEM
-static PetscReal zq[2] = {-0.577350269189626,0.577350269189626},
-                 wq[2] = {1.0,1.0};
-
 static PetscReal xiL[4]  = { 1.0, -1.0, -1.0,  1.0},
                  etaL[4] = { 1.0,  1.0, -1.0, -1.0};

@@ -154,6 +173,13 @@
     }
     return sum;
 }
+
+static PetscReal zq[3][3] = { {0.0,NAN,NAN},
+                              {-1.0/sqrt(3.0),1.0/sqrt(3.0),NAN},
+                              {-sqrt(3.0/5.0),0.0,sqrt(3.0/5.0)} },
+                 wq[3][3] = { {2.0,NAN,NAN},
+                              {1.0,1.0,NAN},
+                              {5.0/9.0,8.0/9.0,5.0/9.0} };
 //ENDFEM

 //STARTTOOLS
@@ -194,9 +220,9 @@
                                   PetscReal *obj, PLapCtx *user) {
   PetscErrorCode ierr;
   const PetscReal hx = 1.0 / (info->mx+1), hy = 1.0 / (info->my+1);
+  const PetscInt  n = user->quaddegree,
+                  XE = info->xs + info->xm, YE = info->ys + info->ym;
   PetscReal       lobj = 0.0, **af, **ag, f[4], u[4];
-  const PetscInt  n = 2;  // FIXME: quad deg
-  const PetscInt  XE = info->xs + info->xm, YE = info->ys + info->ym;
   PetscInt        i,j,r,s;
   MPI_Comm        com;

@@ -213,8 +239,8 @@
               GetUorG(info,i,j,au,ag,u);
               for (r=0; r<n; r++) {
                   for (s=0; s<n; s++) {
-                      lobj += wq[r] * wq[s]
-                              * ObjIntegrand(info,f,u,zq[r],zq[s],user->p);
+                      lobj += wq[n-1][r] * wq[n-1][s]
+                              * ObjIntegrand(info,f,u,zq[n-1][r],zq[n-1][s],user->p);
                   }
               }
           }
@@ -245,10 +271,10 @@
                                  PetscReal **FF, PLapCtx *user) {
   PetscErrorCode ierr;
   const PetscReal hx = 1.0 / (info->mx+1), hy = 1.0 / (info->my+1);
+  const PetscInt  n = user->quaddegree,
+                  ell[2][2] = { {0,3}, {1,2} };
   PetscReal       **af, **ag, f[4], u[4], z;
-  const PetscInt  n = 2;  // FIXME: quad deg
   PetscInt        i,j,c,d,r,s;
-  const PetscInt  ell[2][2] = { {0,3}, {1,2} };

   // compute residual FF[j][i] for each node (x_i,y_j)
   ierr = DMDAVecGetArray(user->da,user->f,&af); CHKERRQ(ierr);
@@ -264,9 +290,9 @@
                   GetUorG(info,i+c,j+d,au,ag,u);
                   for (r=0; r<n; r++) {
                       for (s=0; s<n; s++) {
-                          z += wq[r] * wq[s]
+                          z += wq[n-1][r] * wq[n-1][s]
                                * FunIntegrand(info,ell[c][d],f,u,
-                                              zq[r],zq[s],user->p);
+                                              zq[n-1][r],zq[n-1][s],user->p);
                       }
                   }
               }
@@ -290,12 +316,7 @@
   PetscReal      unorm, err;

   PetscInitialize(&argc,&argv,NULL,help);
-  user.p = 2.0;
-  ierr = PetscOptionsBegin(COMM,"plap_","p-laplacian solver options",""); CHKERRQ(ierr);
-  ierr = PetscOptionsReal("-p","exponent p with  1 <= p < infty",
-                   NULL,user.p,&(user.p),NULL); CHKERRQ(ierr);
-  if (user.p < 1.0) { SETERRQ(COMM,1,"p >= 1 required"); }
-  ierr = PetscOptionsEnd(); CHKERRQ(ierr);
+  ierr = ConfigureCtx(&user); CHKERRQ(ierr);

   ierr = DMDACreate2d(COMM,
                DM_BOUNDARY_GHOSTED, DM_BOUNDARY_GHOSTED, DMDA_STENCIL_BOX,
@@ -325,7 +346,7 @@

   ierr = SNESSolve(snes,NULL,u); CHKERRQ(ierr);
   ierr = VecNorm(uexact,NORM_INFINITY,&unorm); CHKERRQ(ierr);
-  ierr = VecAXPY(u,-1.0,uexact); CHKERRQ(ierr);    // u <- u + (-1.0) uxact
+  ierr = VecAXPY(u,-1.0,uexact); CHKERRQ(ierr);    // u <- u + (-1.0) uexact
   ierr = VecNorm(u,NORM_INFINITY,&err); CHKERRQ(ierr);
   ierr = PetscPrintf(COMM,
       "numerical error:  |u-u_exact|_inf/|u_exact|_inf = %g\n",err/unorm); CHKERRQ(ierr);


client: Add ogeo initialization at client_manage

--- src/client.c
+++ src/client.c
@@ -378,10 +378,10 @@

      c = emalloc(1, sizeof(Client));
      c->win = w;
-     c->geo.x = wa->x;
-     c->geo.y = wa->y + sgeo.y;
-     c->geo.width = wa->width;
-     c->geo.height = wa->height;
+     c->ogeo.x = c->geo.x = wa->x;
+     c->ogeo.y = c->geo.y = wa->y + sgeo.y;
+     c->ogeo.width = c->geo.width = wa->width;
+     c->ogeo.height = c->geo.height = wa->height;
      c->tag = seltag;
      at.event_mask = PropertyChangeMask;


Increment internal error number.

Increment internal error number.

git-svn-id: 33305d871a58cfd02b407b81d5206d2a785211eb@778 159cb52c-178a-4f3c-8eb8-d0aff033d058

--- c/src/ta_common/ta_trace.h
+++ c/src/ta_common/ta_trace.h
@@ -26,7 +26,7 @@
  * use the "NEXT AVAILABLE NUMBER" and increment the
  * number in this file.
  *
- * NEXT AVAILABLE NUMBER: 166
+ * NEXT AVAILABLE NUMBER: 168
  */
 #define TA_INTERNAL_ERROR(Id) (TA_INTERNAL_ERROR+Id)


added note

added note

--- src/client.c
+++ src/client.c
@@ -76,6 +76,7 @@

 void lwmqtt_client_set_callback(lwmqtt_client_t *c, lwmqtt_callback_t cb) { c->callback = cb; }

+// TODO: Duplicate code...
 static int lwmqtt_decode_packet(lwmqtt_client_t *c, int *value, int timeout) {
   unsigned char i;
   int multiplier = 1;


Fix handling of PseudoColor windows running alongside TrueColor.

--- src/client.c
+++ src/client.c
@@ -146,8 +146,12 @@
    np->y = attr.y;
    np->width = attr.width;
    np->height = attr.height;
-   np->visual.depth = attr.depth;
-   np->visual.visual = attr.visual;
+   if(rootVisual.depth > attr.depth) {
+      np->visual = rootVisual;
+   } else {
+      np->visual.depth = attr.depth;
+      np->visual.visual = attr.visual;
+   }
    np->cmap = attr.colormap;
    np->state.status = STAT_NONE;
    np->state.maxFlags = MAX_NONE;
@@ -1343,9 +1347,6 @@
    attrMask |= CWBorderPixel;
    attr.border_pixel = 0;

-   attrMask |= CWColormap;
-   attr.colormap = np->cmap;
-
    x = np->x;
    y = np->y;
    width = np->width;


Add Visual Studio 2013 fix from omnus

Add Visual Studio 2013 fix from omnus

--- src/client.h
+++ src/client.h
@@ -1,5 +1,9 @@
 #ifndef _client_h_
 #define _client_h_
+
+#ifdef _MSC_VER
+    #define snprintf _snprintf
+#endif

 #define DEFAULT_PORT 4080


TODO-1033: tidyup

TODO-1033: tidyup

--- content/OTRadioLink/utility/OTRadValve_ModelledRadValve.h
+++ content/OTRadioLink/utility/OTRadValve_ModelledRadValve.h
@@ -329,7 +329,7 @@
 class ModelledRadValveComputeTargetTempBasic final : public ModelledRadValveComputeTargetTempBase
   {
   public:
-//    ModelledRadValveComputeTargetTempBasic(const ModelledRadValveSensorCtrlStats &s)
+//    ModelledRadValveComputeTargetTempBasic()
 //      {
 //      // TODO validate arg types and that things aren't NULL.  static_assert()?
 //      }


static handle_callback

static handle_callback

--- src/control/callback.c
+++ src/control/callback.c
@@ -24,9 +24,31 @@
 #include "libvlc_internal.h"
 #include <vlc/libvlc.h>

-int libvlc_private_handle_callback( vlc_object_t *p_this, char const *psz_cmd,
-                                    vlc_value_t oldval, vlc_value_t newval,
-                                    void *p_data );
+static int handle_callback( vlc_object_t *p_this, char const *psz_cmd,
+                            vlc_value_t oldval, vlc_value_t newval,
+                            void *p_data )
+{
+    struct libvlc_callback_entry_t *entry = p_data;
+    libvlc_event_t event;
+    event.type = entry->i_event_type;
+    switch ( event.type )
+    {
+        case VOLUME_CHANGED:
+            event.value_type = BOOLEAN_EVENT;
+            break;
+        case INPUT_POSITION_CHANGED:
+            break;
+        default:
+            break;
+    }
+    event.old_value = oldval;
+    event.new_value = newval;
+
+    /* Call the client entry */
+    entry->f_callback( entry->p_instance, &event, entry->p_user_data );
+
+    return VLC_SUCCESS;
+}

 void libvlc_callback_register_for_event( libvlc_instance_t *p_instance,
                                         libvlc_event_type_t i_event_type,
@@ -59,7 +81,7 @@

     int res = var_AddCallback( p_instance->p_libvlc_int,
                                callback_name,
-                               libvlc_private_handle_callback,
+                               handle_callback,
                                entry );

     if (res != VLC_SUCCESS)
@@ -101,30 +123,3 @@
         p_listitem = p_listitem->next;
     }
 }
-
-
-int libvlc_private_handle_callback( vlc_object_t *p_this, char const *psz_cmd,
-                                     vlc_value_t oldval, vlc_value_t newval,
-                                     void *p_data )
-{
-    struct libvlc_callback_entry_t *entry = p_data;
-    libvlc_event_t event;
-    event.type = entry->i_event_type;
-    switch ( event.type )
-    {
-        case VOLUME_CHANGED:
-            event.value_type = BOOLEAN_EVENT;
-            break;
-        case INPUT_POSITION_CHANGED:
-            break;
-        default:
-            break;
-    }
-    event.old_value = oldval;
-    event.new_value = newval;
-
-    /* Call the client entry */
-    entry->f_callback( entry->p_instance, &event, entry->p_user_data );
-
-    return VLC_SUCCESS;
-}


mesa: forbid UseProgram to be called inside Begin/End

The spec doesn't state it should be an error, but. We have this piglit test
useprogram-inside-begin that passes with this commit. No idea what's correct.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Brian Paul <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@vmware.com>

--- src/mesa/main/shaderapi.c
+++ src/mesa/main/shaderapi.c
@@ -1593,6 +1593,8 @@
    struct gl_transform_feedback_object *obj =
       ctx->TransformFeedback.CurrentObject;

+   ASSERT_OUTSIDE_BEGIN_END(ctx);
+
    if (obj->Active) {
       _mesa_error(ctx, GL_INVALID_OPERATION,
                   "glUseProgram(transform feedback active)");


namehint: list card independent devices only once

Card-independent devices such as "null" or "pulse" should only be
added once, not once for each card.

Signed-off-by: John Lindgren <fca58cbc0cae2ac6eb6a499d3c36162920616e4c@tds.net>\
Signed-off-by: Jaroslav Kysela <72edd5e1a572f82f059ccbb83c92b74d6cb051ff@perex.cz>

--- src/control/namehint.c
+++ src/control/namehint.c
@@ -457,10 +457,6 @@
 			list->device = -1;
 			err = try_config(list, list->siface, str);
 		}
-		if (err < 0) {
-			list->card = -1;
-			err = try_config(list, list->siface, str);
-		}
 		if (err == -ENOMEM)
 			goto __error;
 	}
@@ -483,6 +479,29 @@
 	if (s == NULL)
 		return -ENOMEM;
 	list->cardname = s;
+	return 0;
+}
+
+static int add_software_devices(struct hint_list *list)
+{
+	int err;
+	snd_config_t *conf, *n;
+	snd_config_iterator_t i, next;
+	const char *str;
+
+	err = snd_config_search(snd_config, list->siface, &conf);
+	if (err < 0)
+		return err;
+	snd_config_for_each(i, next, conf) {
+		n = snd_config_iterator_entry(i);
+		if (snd_config_get_id(n, &str) < 0)
+			continue;
+		list->card = -1;
+		list->device = -1;
+		err = try_config(list, list->siface, str);
+		if (err == -ENOMEM)
+			return -ENOMEM;
+	}
 	return 0;
 }

@@ -549,6 +568,7 @@
 		if (err >= 0)
 			err = add_card(&list, card);
 	} else {
+		add_software_devices(&list);
 		err = snd_card_next(&card);
 		if (err < 0)
 			goto __error;


RDKB-32690 IE params are broadcasted in beacons after disabling the IE

Impacted Platforms:
All RDKB Boxes

Reason for change:
IE params are getting broadcasted in the beacon frame after disabling the IE

Test Procedure:
Enable IE RFC
Check for IE RFC, it should return true
configure IE Params
Check in beacons if it is broadcasting
Disable IE RFC
Check for IE RFC, it should return false
check Beacons, IE Tag should be 0
IE Params should not be broadcasting

Risks: Medium

Signed-off-by: 8a24cac7071509a5002ab35ea26124ec43e296fd@comcast.com
(cherry picked from commit 1cb8b77621a962e5b9f581175d389615ff8cbdde)
Change-Id: I835e6ef63dd9ce494a6404d248d90db374668339

--- source/TR-181/middle_layer_src/cosa_deviceinfo_dml.c
+++ source/TR-181/middle_layer_src/cosa_deviceinfo_dml.c
@@ -11159,7 +11159,64 @@
     {
 	char str[2];
 	int retPsmGet = CCSP_SUCCESS;
-
+        if(bValue == FALSE)
+	{
+		CcspTraceError(("turn off WiFiInterworkingSupport \n"));
+		int ret = -1;
+		int size = 0;
+		componentStruct_t ** ppComponents = NULL;
+		char* faultParam = NULL;
+		char dst_pathname_cr[64]  =  {0};
+
+		CCSP_MESSAGE_BUS_INFO *bus_info = (CCSP_MESSAGE_BUS_INFO *)bus_handle;
+
+		sprintf(dst_pathname_cr, "%s%s", g_Subsystem, CCSP_DBUS_INTERFACE_CR);
+
+		ret = CcspBaseIf_discComponentSupportingNamespace(bus_handle,
+				dst_pathname_cr,
+				"Device.WiFi.",
+				g_Subsystem,        /* prefix */
+				&ppComponents,
+				&size);
+
+		if ( ret == CCSP_SUCCESS && size == 1)
+		{
+			parameterValStruct_t    val[] = {
+				{ "Device.WiFi.AccessPoint.1.X_RDKCENTRAL-COM_InterworkingServiceEnable", "false", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.2.X_RDKCENTRAL-COM_InterworkingServiceEnable", "false", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.5.X_RDKCENTRAL-COM_InterworkingServiceEnable", "false", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.6.X_RDKCENTRAL-COM_InterworkingServiceEnable", "false", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.9.X_RDKCENTRAL-COM_InterworkingServiceEnable", "false", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.10.X_RDKCENTRAL-COM_InterworkingServiceEnable", "false", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.1.X_RDKCENTRAL-COM_InterworkingApplySettings", "true", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.2.X_RDKCENTRAL-COM_InterworkingApplySettings", "true", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.5.X_RDKCENTRAL-COM_InterworkingApplySettings", "true", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.6.X_RDKCENTRAL-COM_InterworkingApplySettings", "true", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.9.X_RDKCENTRAL-COM_InterworkingApplySettings", "true", ccsp_boolean},
+				{ "Device.WiFi.AccessPoint.10.X_RDKCENTRAL-COM_InterworkingApplySettings", "true", ccsp_boolean},
+
+			};
+
+			ret = CcspBaseIf_setParameterValues
+				(
+				 bus_handle,
+				 ppComponents[0]->componentName,
+				 ppComponents[0]->dbusPath,
+				 0, 0x0,
+				 val,
+				 12,
+				 TRUE,
+				 &faultParam
+				);
+
+			if (ret != CCSP_SUCCESS && faultParam)
+			{
+				AnscTraceError(("Error:Failed to SetValue for param '%s'\n", faultParam));
+				bus_info->freefunc(faultParam);
+			}
+			free_componentStruct_t(bus_handle, size, ppComponents);
+		}
+        }
 	sprintf(str,"%d",bValue);
 	retPsmGet = PSM_Set_Record_Value2(bus_handle,g_Subsystem, "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.WiFi-Interworking.Enable", ccsp_string, str);
 	if (retPsmGet != CCSP_SUCCESS) {


* src/control/playlist.c: Fix typo vlc_mutex_unlokc -> vlc_mutex_unlock

--- src/control/playlist.c
+++ src/control/playlist.c
@@ -136,7 +136,7 @@
         }
     }
     libvlc_exception_raise( p_e, "item not found" );
-    vlc_mutex_unlokc( &PL->object_lock );
+    vlc_mutex_unlock( &PL->object_lock );
     return VLC_EGENERIC;
 }


...Can't... resist... zot.... wand...
                                  ....must... fix...!!

* svn_client.h (svn_client_get_simple_prompt_provider):  doxygenify.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@844814 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/include/svn_client.h
+++ subversion/include/svn_client.h
@@ -115,17 +115,18 @@
 } svn_client_auth_baton_t;

-/* Set *PROVIDER and *PROVIDER_BATON to an authentication provider of
- * type svn_auth_cred_simple_t that gets information by prompting the
- * user with PROMPT_FUNC and PROMPT_BATON.  If either
- * SVN_AUTH_PARAM_DEFAULT_USERNAME or SVN_AUTH_PARAME_DEFAULT_PASSWORD
- * is defined as a runtime parameter in the auth_baton, then return
- * the default argument(s) when svn_auth_first_credentials is called.
- * If first_credentials() fails, then re-prompt RETRY_LIMIT number of
- * times (via next_credentials()).  BASE_DIR is the top-most working
- * copy directory into which successfully authenticated credentials
- * will be cached.  It may be NULL where no working copy is available.
- * BASE_ACCESS is the access baton associated with BASE_DIR. */
+/** Fetch an authentication provider which prompts the user for name
+ * and password.
+ *
+ * Set @a *provider and @a *provider_baton to an authentication
+ * provider of type @c svn_auth_cred_simple_t that gets information by
+ * prompting the user with @a prompt_func and @a prompt_baton.  If
+ * either @c SVN_AUTH_PARAM_DEFAULT_USERNAME or @c
+ * SVN_AUTH_PARAME_DEFAULT_PASSWORD is defined as a runtime parameter
+ * in the @c auth_baton, then return the default argument(s) when @c
+ * svn_auth_first_credentials is called.  If @c
+ * svn_auth_first_credentials fails, then re-prompt @a retry_limit
+ * number of times (via @c svn_auth_next_credentials). */
 void
 svn_client_get_simple_prompt_provider (const svn_auth_provider_t **provider,
                                        void **provider_baton,


Fixed typo in code comment.

Fixed typo in code comment.

--- OptimizelySDKShared/OptimizelySDKShared/OPTLYFileManager.h
+++ OptimizelySDKShared/OptimizelySDKShared/OPTLYFileManager.h
@@ -58,7 +58,7 @@
                        error:(NSError * _Nullable * _Nullable)error;

 /**
- * Deterimes if a file exists in the documents directory.
+ * Determines if a file exists in the documents directory.
  *
  * @param fileName A string that represents the name of the file to check.
  * @param fileType The type of file (e.g., datafile, user profile, event dispatcher, preview, editor)


corrected test file

corrected test file

--- test/e2e/test_input/skia/src/core/SkLeanWindows.h
+++ test/e2e/test_input/skia/src/core/SkLeanWindows.h
@@ -18,9 +18,9 @@
 #    define NOMINMAX
 #    define NOMINMAX_WAS_LOCALLY_DEFINED
 #  endif
-#
+
 #  include <windows.h>
-#
+
 #  ifdef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
 #    undef WIN32_IS_MEAN_WAS_LOCALLY_DEFINED
 #    undef WIN32_LEAN_AND_MEAN


drivers: gpu: Mark function as static in mgag200_main.c

Mark function mgag200_bo_unref() as static in drm/mgag200/mgag200_main.c
because it is not used outside this file.

This eliminates the following warning in drm/mgag200/mgag200_main.c:
drivers/gpu/drm/mgag200/mgag200_main.c:313:6: warning: no previous prototype for ‘mgag200_bo_unref’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <62a2cbd3422b0d621dafb7ceeff40187aeaed4ed@gmail.com>
Reviewed-by: Josh Triplett <c028c213ed5efcf30c3f4fc7361dbde0c893c5b7@joshtriplett.org>
Signed-off-by: Dave Airlie <f2295d84e358395675bc8031be58672073ae065e@redhat.com>

--- drivers/gpu/drm/mgag200/mgag200_main.c
+++ drivers/gpu/drm/mgag200/mgag200_main.c
@@ -310,7 +310,7 @@
 	return 0;
 }

-void mgag200_bo_unref(struct mgag200_bo **bo)
+static void mgag200_bo_unref(struct mgag200_bo **bo)
 {
 	struct ttm_buffer_object *tbo;


register other USB key ids

register other USB key ids

--- libs/platform/keyboard.h
+++ libs/platform/keyboard.h
@@ -135,7 +135,7 @@
 	KEY_F23 = 114,
 	KEY_F24 = 115,

-//	KEY_EXECUTE    = 116,
+	KEY_EXECUTE    = 116,
 	KEY_HELP       = 117,
 	KEY_MENU       = 118,
 	KEY_SELECT     = 119,
@@ -150,6 +150,94 @@
 	KEY_VOLUMEUP   = 128,
 	KEY_VOLUMEDOWN = 129,

+	KEY_LOCKING_CAPSLOCK = 130,
+	KEY_LOCKING_NUMLOCK = 131,
+	KEY_LOCKING_SCROLLLOCK = 132,
+
+	KEY_KP_COMMA = 133,
+	KEY_KP_EQUAL2 = 134,
+
+	KEY_INTERNATIONAL1 = 135,
+	KEY_INTERNATIONAL2 = 136,
+	KEY_INTERNATIONAL3 = 137,
+	KEY_INTERNATIONAL4 = 138,
+	KEY_INTERNATIONAL5 = 139,
+	KEY_INTERNATIONAL6 = 140,
+	KEY_INTERNATIONAL7 = 141,
+	KEY_INTERNATIONAL8 = 142,
+	KEY_INTERNATIONAL9 = 143,
+	KEY_LANG1 = 144,
+	KEY_LANG2 = 145,
+	KEY_LANG3 = 146,
+	KEY_LANG4 = 147,
+	KEY_LANG5 = 148,
+	KEY_LANG6 = 149,
+	KEY_LANG7 = 150,
+	KEY_LANG8 = 151,
+	KEY_LANG9 = 152,
+
+	KEY_ALT_ERASE = 153,
+	KEY_SYSRQ = 154,
+	KEY_CANCEL = 155,
+	KEY_CLEAR = 156,
+	KEY_PRIOR = 157,
+	KEY_RETURN2 = 158,
+	KEY_SEPARATOR = 159,
+	KEY_OUT = 160,
+	KEY_OPER = 161,
+	KEY_AGAIN2 = 162,
+	KEY_CRSEL = 163,
+	KEY_EXSEL = 164,
+	KEY_OUT2 = 165,
+
+	KEY_KP_00               = 176,
+	KEY_KP_000              = 177,
+	KEY_KP_THOUSAND_SEP     = 178,
+	KEY_KP_DECIMAL_SEP      = 179,
+	KEY_KP_CURRENCY_UNIT    = 180,
+	KEY_KP_CURRENCY_SUBUNIT = 181,
+
+	KEY_KP_OPEN_PAREN  = 182,
+	KEY_KP_CLOSE_PAREN = 183,
+	KEY_KP_OPEN_BRACE  = 184,
+	KEY_KP_CLOSE_BRACE = 185,
+	KEY_KP_TAB         = 186,
+	KEY_KP_BACKSPACE   = 187,
+	KEY_KP_A           = 188,
+	KEY_KP_B           = 189,
+	KEY_KP_C           = 190,
+	KEY_KP_D           = 191,
+	KEY_KP_E           = 192,
+	KEY_KP_F           = 193,
+	KEY_KP_XOR         = 194,
+	KEY_KP_HAT         = 195,
+	KEY_KP_PERCENT     = 196,
+	KEY_KP_LESSTHAN    = 197,
+	KEY_KP_GREATERTHAN = 198,
+	KEY_KP_AMPERSAND   = 199,
+	KEY_KP_DOUBLE_AMPERSAND = 200,
+	KEY_KP_PIPE        = 201,///< |
+	KEY_KP_PIPEPIPE    = 202,///< ||
+	KEY_KP_COLON       = 203,
+	KEY_KP_HASH        = 204,
+	KEY_KP_SPACE       = 205,
+	KEY_KP_AT          = 206,
+	KEY_KP_BANG        = 207,
+	KEY_KP_MEM_STORE   = 208,
+	KEY_KP_MEM_RECALL  = 209,
+	KEY_KP_MEM_CLEAR   = 210,
+	KEY_KP_MEM_ADD     = 211,
+	KEY_KP_MEM_SUB     = 212,
+	KEY_KP_MEM_MUL     = 213,
+	KEY_KP_MEM_DIV     = 214,
+	KEY_KP_MEM_NEGATE  = 215,
+	KEY_KP_CLEAR       = 216,
+	KEY_KP_CLEAR_ENTRY = 217,
+	KEY_KP_BINARY      = 218,
+	KEY_KP_OCTAL       = 219,
+	KEY_KP_DECIMAL     = 220,
+	KEY_KP_HEX         = 221,
+
 	KEY_LCTRL      = 224,
 	KEY_LSHIFT     = 225,
 	KEY_LALT       = 226,


msg: MExportDir has a private destructor

--- src/messages/MExportDir.h
+++ src/messages/MExportDir.h
@@ -31,6 +31,10 @@
     Message(MSG_MDS_EXPORTDIR),
     dirfrag(df) {
   }
+private:
+  ~MExportDir() {}
+
+public:
   const char *get_type_name() { return "Ex"; }
   void print(ostream& o) {
     o << "export(" << dirfrag << ")";


Fix structure layout of svn_client_ctx_t, which previously resulted in
ABI breakage.

* subversion/include/svn_client.h
  (svn_client_ctx_t): Move log_msg_func3 and log_msg_baton3
   within structure to be compatible with 1.4 and 1.3.

Patch by: Bert Huijben <bhuijben@competence.biz>
Review by: malcolm
           rooneg
           me

--- subversion/include/svn_client.h
+++ subversion/include/svn_client.h
@@ -814,6 +814,15 @@
    * @since New in 1.3. */
   void *log_msg_baton2;

+  /** Notification callback for network progress information.
+   * May be NULL if not used.
+   * @since New in 1.3. */
+  svn_ra_progress_notify_func_t progress_func;
+
+  /** Callback baton for progress_func.
+   * @since New in 1.3. */
+  void *progress_baton;
+
   /** Log message callback function. NULL means that Subversion
    *   should try @c log_msg_func2, then @c log_msg_func.
    * @since New in 1.5. */
@@ -822,15 +831,6 @@
   /** The callback baton for @c log_msg_func3.
    * @since New in 1.5. */
   void *log_msg_baton3;
-
-  /** Notification callback for network progress information.
-   * May be NULL if not used.
-   * @since New in 1.3. */
-  svn_ra_progress_notify_func_t progress_func;
-
-  /** Callback baton for progress_func.
-   * @since New in 1.3. */
-  void *progress_baton;

   /** MIME types map.
    * @since New in 1.5. */


drm/nouveau: Gigabyte NX85T connector table lies, it has DVI-I not HDMI

Signed-off-by: Ben Skeggs <d9f27fb07c1e9f131223ad827fa5179f3846c30b@redhat.com>

--- drivers/gpu/drm/nouveau/nouveau_bios.c
+++ drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -5211,6 +5211,21 @@
 }

 static void
+apply_dcb_connector_quirks(struct nvbios *bios, int idx)
+{
+	struct dcb_connector_table_entry *cte = &bios->dcb.connector.entry[idx];
+	struct drm_device *dev = bios->dev;
+
+	/* Gigabyte NX85T */
+	if ((dev->pdev->device == 0x0421) &&
+	    (dev->pdev->subsystem_vendor == 0x1458) &&
+	    (dev->pdev->subsystem_device == 0x344c)) {
+		if (cte->type == DCB_CONNECTOR_HDMI_1)
+			cte->type = DCB_CONNECTOR_DVI_I;
+	}
+}
+
+static void
 parse_dcb_connector_table(struct nvbios *bios)
 {
 	struct drm_device *dev = bios->dev;
@@ -5265,6 +5280,8 @@

 		if (cte->type == 0xff)
 			continue;
+
+		apply_dcb_connector_quirks(bios, i);

 		NV_INFO(dev, "  %d: 0x%08x: type 0x%02x idx %d tag 0x%02x\n",
 			i, cte->entry, cte->type, cte->index, cte->gpio_tag);


Create NewWorkout.c

Create NewWorkout.c

error: pathspec 'FMER/scripts/editCreateWorkout/editorButtons/NewWorkout.c' did not match any file(s) known to git

--- FMER/scripts/editCreateWorkout/editorButtons/NewWorkout.c
+++ FMER/scripts/editCreateWorkout/editorButtons/NewWorkout.c
@@ -0,0 +1,26 @@
+editCreateWorkout: editorButtons: NewWorkout
+Set Error Capture [ On ]
+Allow User Abort [ Off ]
+#
+#Create a new segment record for this workout.
+New Record/Request
+Set Field [ activity::kuser; planlog::kuserGlobal ]
+#
+#Set greem line to starting position.
+Set Field [ activity::segmentNumberGlobal; 1 ]
+#
+#Capture workout key and then find just this workout.
+Set Variable [ $workout; Value:activity::_Lactivity ]
+Enter Find Mode [ ]
+Set Field [ activity::_Lactivity; $workout ]
+Perform Find [ ]
+#
+#Set max heart rate to current global max.
+Set Field [ activity::kexercise; exerciseMHR::kexerciseGlobal ]
+Set Field [ exerciseActivity::MaxHeartRate; exerciseActivity::MaxHeartRateCurrent ]
+Set Field [ segment01::MaxHeartRate; exerciseActivity::MaxHeartRateCurrent ]
+#
+#Create a first segment for this workout.
+Perform Script [ “NewSegment” ]
+#
+January 8, 平成26 12:38:25 Fat and Muscle Efﬁciency Research.fp7 - NewWorkout -1-


add GetVocabIds()

add GetVocabIds()

--- contrib/other-builds/moses2/legacy/ProbingPT/StoreVocab.h
+++ contrib/other-builds/moses2/legacy/ProbingPT/StoreVocab.h
@@ -8,6 +8,7 @@
 #include <string>
 #include <boost/unordered_map.hpp>
 #include "../OutputFileStream.h"
+#include "../Util2.h"

 namespace Moses2
 {
@@ -41,6 +42,20 @@
     }
   }

+  std::vector<VOCABID> GetVocabIds(const std::string &line)
+  {
+    std::vector<std::string> toks = Moses2::Tokenize(line, " ");
+    std::vector<VOCABID> ret(toks.size());
+
+    for (size_t i = 0; i < toks.size(); ++i) {
+      const std::string &tok = toks[i];
+      VOCABID id = GetVocabId(tok);
+      ret[i] = id;
+    }
+
+    return ret;
+  }
+
   void Save()
   {
     OutputFileStream strme(m_path);


fix debug message to not use freed variables

--- libswfdec/swfdec_movie.c
+++ libswfdec/swfdec_movie.c
@@ -477,11 +477,11 @@
       g_free (value);
       break;
     }
+    SWFDEC_LOG ("Set variable \"%s\" to \"%s\"", name, value);
     asname = swfdec_as_context_give_string (as->context, name);
     SWFDEC_AS_VALUE_SET_STRING (&val, swfdec_as_context_get_string (as->context, value));
     g_free (value);
     swfdec_as_object_set_variable (as, asname, &val);
-    SWFDEC_LOG ("Set variable \"%s\" to \"%s\"", name, value);
   }
 }


Doc string fix.

Doc string fix.

* subversion/include/svn_string.h
  (svn_stringbuf_create_empty): added in 1.8 (not 1.7)
  (svn_string_create_empty): ditto, plus there is no blocksize

Found by: stsp

--- subversion/include/svn_string.h
+++ subversion/include/svn_string.h
@@ -131,8 +131,8 @@
 svn_string_t *
 svn_string_create(const char *cstring, apr_pool_t *pool);

-/** Create a truely empty string object (length and blocksize are 0)
- * @since New in 1.7.
+/** Create a truely empty string object (length is 0)
+ * @since New in 1.8.
  */
 svn_string_t *
 svn_string_create_empty(apr_pool_t *pool);
@@ -204,7 +204,7 @@
 svn_stringbuf_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);

 /** Create a truely empty string object (length and blocksize are 0)
- * @since New in 1.7.
+ * @since New in 1.8.
  */
 svn_stringbuf_t *
 svn_stringbuf_create_empty(apr_pool_t *pool);


drm/nouveau: fix potential accuracy loss when parsing perf 0x1c tables

Reported-by: Roy Spliet <e16bf78a1483ab993c7c212aa768af19f2d12eb8@student.tudelft.nl>
Signed-off-by: Ben Skeggs <d9f27fb07c1e9f131223ad827fa5179f3846c30b@redhat.com>

--- drivers/gpu/drm/nouveau/nouveau_perf.c
+++ drivers/gpu/drm/nouveau/nouveau_perf.c
@@ -90,49 +90,43 @@
 		case 0x15:
 			perflvl->fanspeed = entry[55];
 			perflvl->voltage = entry[56];
-			perflvl->core = ROM32(entry[1]) / 100;
-			perflvl->memory = ROM32(entry[5]) / 100;
+			perflvl->core = ROM32(entry[1]) * 10;
+			perflvl->memory = ROM32(entry[5]) * 10;
 			break;
 		case 0x21:
 		case 0x23:
 		case 0x24:
 			perflvl->fanspeed = entry[4];
 			perflvl->voltage = entry[5];
-			perflvl->core = ROM16(entry[6]);
-			perflvl->memory = ROM16(entry[11]);
+			perflvl->core = ROM16(entry[6]) * 1000;
+			perflvl->memory = ROM16(entry[11]) * 1000;
 			break;
 		case 0x25:
 			perflvl->fanspeed = entry[4];
 			perflvl->voltage = entry[5];
-			perflvl->core = ROM16(entry[6]);
-			perflvl->shader = ROM16(entry[10]);
-			perflvl->memory = ROM16(entry[12]);
+			perflvl->core = ROM16(entry[6]) * 1000;
+			perflvl->shader = ROM16(entry[10]) * 1000;
+			perflvl->memory = ROM16(entry[12]) * 1000;
 			break;
 		case 0x30:
 		case 0x35:
 			perflvl->fanspeed = entry[6];
 			perflvl->voltage = entry[7];
-			perflvl->core = ROM16(entry[8]);
-			perflvl->shader = ROM16(entry[10]);
-			perflvl->memory = ROM16(entry[12]);
+			perflvl->core = ROM16(entry[8]) * 1000;
+			perflvl->shader = ROM16(entry[10]) * 1000;
+			perflvl->memory = ROM16(entry[12]) * 1000;
 			/*XXX: confirm on 0x35 */
-			perflvl->unk05 = ROM16(entry[16]);
+			perflvl->unk05 = ROM16(entry[16]) * 1000;
 			break;
 		case 0x40:
 #define subent(n) entry[perf[2] + ((n) * perf[3])]
 			perflvl->fanspeed = 0; /*XXX*/
 			perflvl->voltage = 0; /*XXX: entry[2] */;
-			perflvl->core = ROM16(subent(0)) & 0xfff;
-			perflvl->shader = ROM16(subent(1)) & 0xfff;
-			perflvl->memory = ROM16(subent(2)) & 0xfff;
+			perflvl->core = (ROM16(subent(0)) & 0xfff) * 1000;
+			perflvl->shader = (ROM16(subent(1)) & 0xfff) * 1000;
+			perflvl->memory = (ROM16(subent(2)) & 0xfff) * 1000;
 			break;
 		}
-
-		/* convert MHz -> KHz, it's more convenient */
-		perflvl->core *= 1000;
-		perflvl->memory *= 1000;
-		perflvl->shader *= 1000;
-		perflvl->unk05 *= 1000;

 		/* make sure vid is valid */
 		if (pm->voltage.supported && perflvl->voltage) {


Remove an access baton from client copy.

* subversion/libsvn_client/copy.c
  (calculate_target_mergeinfo): Replace adm_access parameter with
   local_abspath, rename src_url parameter, remove no_repos_access
   parameter. Remove no_repos_access code as it was never used.
  (repos_to_repos_copy): Don't pass no_repos_access.
  (wc_to_repos_copy): Pass src as local_abspath, NULL as url and don't
   pass no_repos_access.
  (repos_ro_wc_copy_single): Don't pass no_repos_access.

--- subversion/libsvn_client/copy.c
+++ subversion/libsvn_client/copy.c
@@ -72,33 +72,30 @@

 /* Obtain the implied mergeinfo and the existing mergeinfo of the
    source path, combine them and return the result in
-   *TARGET_MERGEINFO.  ADM_ACCESS may be NULL, if SRC_PATH_OR_URL is an
-   URL.  If NO_REPOS_ACCESS is set, this function is disallowed from
-   consulting the repository about anything.  RA_SESSION may be NULL but
-   only if NO_REPOS_ACCESS is true.  */
+   *TARGET_MERGEINFO.  One of LOCAL_ABSPATH and SRC_URL must be valid,
+   the other must be NULL. */
 static svn_error_t *
 calculate_target_mergeinfo(svn_ra_session_t *ra_session,
                            apr_hash_t **target_mergeinfo,
-                           svn_wc_adm_access_t *adm_access,
-                           const char *src_path_or_url,
+                           const char *local_abspath,
+                           const char *src_url,
                            svn_revnum_t src_revnum,
-                           svn_boolean_t no_repos_access,
                            svn_client_ctx_t *ctx,
                            apr_pool_t *pool)
 {
   const svn_wc_entry_t *entry = NULL;
   svn_boolean_t locally_added = FALSE;
-  const char *src_url;
   apr_hash_t *src_mergeinfo = NULL;
+
+  SVN_ERR_ASSERT((local_abspath && !src_url) || (!local_abspath && src_url));

   /* If we have a schedule-add WC path (which was not copied from
      elsewhere), it doesn't have any repository mergeinfo, so don't
      bother checking. */
-  if (adm_access)
-    {
-      const char *local_abspath;
-
-      SVN_ERR(svn_dirent_get_absolute(&local_abspath, src_path_or_url, pool));
+  if (local_abspath)
+    {
+      SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
+
       SVN_ERR(svn_wc__get_entry_versioned(&entry, ctx->wc_ctx, local_abspath,
                                           svn_node_unknown, FALSE, FALSE,
                                           pool, pool));
@@ -114,42 +111,23 @@
                                              pool, pool));
         }
     }
-  else
-    {
-      src_url = src_path_or_url;
-    }

   if (! locally_added)
     {
-      if (! no_repos_access)
-        {
-          /* Fetch any existing (explicit) mergeinfo.  We'll temporarily
-             reparent to the target URL here, just to keep the code simple.
-             We could, as an alternative, first see if the target URL was a
-             child of the session URL and use the relative "remainder",
-             falling back to this reparenting as necessary.  */
-          const char *old_session_url = NULL;
-          SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url,
-                                                    ra_session, src_url, pool));
-          SVN_ERR(svn_client__get_repos_mergeinfo(ra_session, &src_mergeinfo,
-                                                  "", src_revnum,
-                                                  svn_mergeinfo_inherited,
-                                                  TRUE, pool));
-          if (old_session_url)
-            SVN_ERR(svn_ra_reparent(ra_session, old_session_url, pool));
-        }
-      else
-        {
-          svn_boolean_t inherited;
-          const char *local_abspath;
-
-          SVN_ERR(svn_dirent_get_absolute(&local_abspath, src_path_or_url,
-                                          pool));
-          SVN_ERR(svn_client__get_wc_mergeinfo(&src_mergeinfo, &inherited,
-                                               svn_mergeinfo_inherited,
-                                               local_abspath, NULL,
-                                               NULL, ctx, pool, pool));
-        }
+      /* Fetch any existing (explicit) mergeinfo.  We'll temporarily
+         reparent to the target URL here, just to keep the code simple.
+         We could, as an alternative, first see if the target URL was a
+         child of the session URL and use the relative "remainder",
+         falling back to this reparenting as necessary.  */
+      const char *old_session_url = NULL;
+      SVN_ERR(svn_client__ensure_ra_session_url(&old_session_url,
+                                                ra_session, src_url, pool));
+      SVN_ERR(svn_client__get_repos_mergeinfo(ra_session, &src_mergeinfo,
+                                              "", src_revnum,
+                                              svn_mergeinfo_inherited,
+                                              TRUE, pool));
+      if (old_session_url)
+        SVN_ERR(svn_ra_reparent(ra_session, old_session_url, pool));
     }

   *target_mergeinfo = src_mergeinfo;
@@ -809,8 +787,9 @@
       /* Go ahead and grab mergeinfo from the source, too. */
       SVN_ERR(svn_client__ensure_ra_session_url(&ignored_url, ra_session,
                                                 pair->src, pool));
-      SVN_ERR(calculate_target_mergeinfo(ra_session, &mergeinfo, NULL, pair->src,
-                                         pair->src_revnum, FALSE, ctx, pool));
+      SVN_ERR(calculate_target_mergeinfo(ra_session, &mergeinfo, NULL,
+                                         pair->src,
+                                         pair->src_revnum, ctx, pool));
       if (mergeinfo)
         SVN_ERR(svn_mergeinfo_to_string(&info->mergeinfo, mergeinfo, pool));

@@ -1358,9 +1337,9 @@
          info known to the WC and the repository. */
       item->outgoing_prop_changes = apr_array_make(pool, 1,
                                                    sizeof(svn_prop_t *));
-      SVN_ERR(calculate_target_mergeinfo(ra_session, &mergeinfo, adm_access,
-                                         pair->src, pair->src_revnum,
-                                         FALSE, ctx, iterpool));
+      SVN_ERR(calculate_target_mergeinfo(ra_session, &mergeinfo, pair->src,
+                                         NULL, SVN_INVALID_REVNUM,
+                                         ctx, iterpool));
       SVN_ERR(svn_wc__get_entry_versioned(&entry, ctx->wc_ctx, pair->src,
                                           svn_node_unknown, FALSE, FALSE,
                                           pool, pool));
@@ -1497,7 +1476,7 @@
              ### source path. */
           SVN_ERR(calculate_target_mergeinfo(ra_session, &src_mergeinfo, NULL,
                                              pair->src, src_revnum,
-                                             FALSE, ctx, pool));
+                                             ctx, pool));
           SVN_ERR(extend_wc_mergeinfo(dst_abspath, src_mergeinfo, ctx, pool));
         }
       else  /* different repositories */
@@ -1555,7 +1534,7 @@

       SVN_ERR(calculate_target_mergeinfo(ra_session, &src_mergeinfo,
                                          NULL, pair->src, src_revnum,
-                                         FALSE, ctx, pool));
+                                         ctx, pool));
       SVN_ERR(extend_wc_mergeinfo(dst_abspath, src_mergeinfo, ctx, pool));

       /* Ideally, svn_wc_add_repos_file3() would take a notify function


Windows: DuplicateHandle failure is not a warning

This is because WinUSB handles are not duplicable, and generate a
lot of these warnings.

--- libusb/os/poll_windows.c
+++ libusb/os/poll_windows.c
@@ -411,7 +411,7 @@
 				_poll_fd[i].thread_id = GetCurrentThreadId();
 				if (!DuplicateHandle(GetCurrentProcess(), handle, GetCurrentProcess(),
 					&wfd.handle, 0, TRUE, DUPLICATE_SAME_ACCESS)) {
-					usbi_warn(NULL, "could not duplicate handle for CancelIo - using original one");
+					usbi_dbg("could not duplicate handle for CancelIo - using original one");
 					wfd.handle = handle;
 					// Make sure we won't close the original handle on fd deletion then
 					_poll_fd[i].original_handle = INVALID_HANDLE_VALUE;


drm/nouveau: Fix parsing of the temperature constant correction.

Signed-off-by: Francisco Jerez <5906ff32bdd9fd8db196f6ba5ad3afd6f9257ea5@riseup.net>
Signed-off-by: Ben Skeggs <d9f27fb07c1e9f131223ad827fa5179f3846c30b@redhat.com>

--- drivers/gpu/drm/nouveau/nouveau_temp.c
+++ drivers/gpu/drm/nouveau/nouveau_temp.c
@@ -113,8 +113,8 @@

 		switch (temp[0]) {
 		case 0x01:
-			value = (value&0x8f) == 0 ? (value >> 9) & 0x7f : 0;
-			sensor->offset_constant = value;
+			if ((value & 0x8f) == 0)
+				sensor->offset_constant = (value >> 9) & 0x7f;
 			break;

 		case 0x04:


More deprecated function removal: this time a stream copy function.

* subversion/libsvn_client/diff.c
  (dump_svnpatch): Add extra parameters for cancellation, and update
    deprecated API.
  (do_diff): Pass the now-required cancellation parameters.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@877287 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_client/diff.c
+++ subversion/libsvn_client/diff.c
@@ -370,6 +370,8 @@
  * from clear-text @c callback_baton->svnpatch_file. */
 static svn_error_t *
 dump_svnpatch(struct diff_cmd_baton *callback_baton,
+              svn_cancel_func_t cancel_func,
+              void *cancel_baton,
               apr_pool_t *pool)
 {
   svn_stream_t *svnpatch_stream;
@@ -408,21 +410,16 @@
    * zlib's.  In other words, the copy operation invokes these two
    * functions in a streamy way: read(svnpatch_file),
    * write(zlib(base64(outfile))).  */
-  svnpatch_stream = svn_stream_from_aprfile2
-                     (callback_baton->svnpatch_file,
-                      FALSE, pool);
-  out_stream = svn_stream_compressed
-                (svn_base64_encode(
-                 svn_stream_from_aprfile2
-                  (callback_baton->outfile,
-                   FALSE, pool),
-                 pool), pool);
-  SVN_ERR(svn_stream_copy(svnpatch_stream, out_stream, pool));
-
-  /* Squeeze out. */
-  SVN_ERR(svn_stream_close(out_stream));
-
-  return SVN_NO_ERROR;
+  svnpatch_stream = svn_stream_from_aprfile2(callback_baton->svnpatch_file,
+                                             TRUE, pool);
+  out_stream = svn_stream_compressed(
+                 svn_base64_encode(
+                   svn_stream_from_aprfile2(callback_baton->outfile,
+                                            FALSE, pool),
+                   pool),
+                 pool);
+  return svn_stream_copy3(svnpatch_stream, out_stream,
+                          cancel_func, cancel_baton, pool);
 }

@@ -1521,7 +1518,8 @@
     }

   if (callback_baton->svnpatch_file)
-    SVN_ERR(dump_svnpatch(callback_baton, pool));
+    SVN_ERR(dump_svnpatch(callback_baton, ctx->cancel_func, ctx->cancel_baton,
+                          pool));

   return SVN_NO_ERROR;
 }


libv4l: Adjust mr97310a for gspca mr97310a driver changes

From: Theodore Kilgore <c9104a9f29bcc89215472387b083146c6cabb056@auburn.edu>

This patch introduces an offset of 12 bytes before starting the
decompression of a frame. This needs to be done to compensate for a change
in the gspca driver, where headers are now preserved instead of
suppressed.

Priority: normal

Signed-off-by: Hans de Goede <9fa1be1a5b5729e4c6b404f34c9ce49ff4882fd8@redhat.com>
Signed-off-by: Theodore Kilgore <c9104a9f29bcc89215472387b083146c6cabb056@auburn.edu>

--- libv4lconvert/mr97310a.c
+++ libv4lconvert/mr97310a.c
@@ -102,6 +102,9 @@
 	if (!decoder_initialized)
 		init_mr97310a_decoder();

+	/* remove the header */
+		inp += 12;
+
 	bitpos = 0;

 	/* main decoding loop */


drm/nouveau/nv50/disp: Fix modeset on G94

Commit 1dce6264045cd23e9c07574ed0bb31c7dce9354f introduced a regression
spotted on several G94 (FDObz #85160). This device seems to expect the
vblank period to be set after setting scale instead of before.

V2: shove this in a separate function

This is a candidate bug-fix for 3.18

Signed-off-by: Roy Spliet <d9688ef3057d444a28533a3a1e7008526e24d16d@eclipso.eu>
Tested-by: Zlatko Calusic <5d15f7dce45fe0e68f7200796c13242a711c1eff@bitsync.net>
Tested-by: Michael Riesch <17b9e1c64588c7fa6419b4d29dc1f4426279ba01@riesch.at>
Tested-by: "poma" <57836df77b9122b8f49ca59970cd915e03a6097e@gmail.com>
Tested-by: Adam Williamson <7cd9ef56b01bdebc78d3aba9e4f46c06f65d2a1b@happyassassin.net>
Signed-off-by: Ben Skeggs <d9f27fb07c1e9f131223ad827fa5179f3846c30b@redhat.com>

--- drivers/gpu/drm/nouveau/nv50_display.c
+++ drivers/gpu/drm/nouveau/nv50_display.c
@@ -787,6 +787,22 @@
 		}
 	}

+	return 0;
+}
+
+static int
+nv50_crtc_set_raster_vblank_dmi(struct nouveau_crtc *nv_crtc, u32 usec)
+{
+	struct nv50_mast *mast = nv50_mast(nv_crtc->base.dev);
+	u32 *push;
+
+	push = evo_wait(mast, 8);
+	if (!push)
+		return -ENOMEM;
+
+	evo_mthd(push, 0x0828 + (nv_crtc->index * 0x400), 1);
+	evo_data(push, usec);
+	evo_kick(push, mast);
 	return 0;
 }

@@ -1104,14 +1120,14 @@
 			evo_mthd(push, 0x0804 + (nv_crtc->index * 0x400), 2);
 			evo_data(push, 0x00800000 | mode->clock);
 			evo_data(push, (ilace == 2) ? 2 : 0);
-			evo_mthd(push, 0x0810 + (nv_crtc->index * 0x400), 8);
+			evo_mthd(push, 0x0810 + (nv_crtc->index * 0x400), 6);
 			evo_data(push, 0x00000000);
 			evo_data(push, (vactive << 16) | hactive);
 			evo_data(push, ( vsynce << 16) | hsynce);
 			evo_data(push, (vblanke << 16) | hblanke);
 			evo_data(push, (vblanks << 16) | hblanks);
 			evo_data(push, (vblan2e << 16) | vblan2s);
-			evo_data(push, vblankus);
+			evo_mthd(push, 0x082c + (nv_crtc->index * 0x400), 1);
 			evo_data(push, 0x00000000);
 			evo_mthd(push, 0x0900 + (nv_crtc->index * 0x400), 2);
 			evo_data(push, 0x00000311);
@@ -1141,6 +1157,11 @@
 	nv_connector = nouveau_crtc_connector_get(nv_crtc);
 	nv50_crtc_set_dither(nv_crtc, false);
 	nv50_crtc_set_scale(nv_crtc, false);
+
+	/* G94 only accepts this after setting scale */
+	if (nv50_vers(mast) < GF110_DISP_CORE_CHANNEL_DMA)
+		nv50_crtc_set_raster_vblank_dmi(nv_crtc, vblankus);
+
 	nv50_crtc_set_color_vibrance(nv_crtc, false);
 	nv50_crtc_set_image(nv_crtc, crtc->primary->fb, x, y, false);
 	return 0;


Fix issue 1173.  It's kind of a lame work around, but it does get us back
to the output we had before the client context was added.

* subversion/libsvn_client/diff.c
  (merge_file_added, merge_dir_added): temporarily NULL out the client
   context's notification callback before calling svn_client_copy, and
   restore it afterwards.

--- subversion/libsvn_client/diff.c
+++ subversion/libsvn_client/diff.c
@@ -510,11 +510,27 @@
           child = svn_path_is_child(merge_b->target, mine, merge_b->pool);
           assert (child != NULL);
           copyfrom_url = svn_path_join (merge_b->url, child, merge_b->pool);
-          /* ### FIXME: This will get the file again! */
-          /* ### 838 When 838 stops using svn_client_copy the adm_access
-             parameter can be removed from the function. */
-          SVN_ERR (svn_client_copy (NULL, copyfrom_url, merge_b->revision,
-                                    mine, adm_access, merge_b->ctx, subpool));
+
+          {
+            svn_wc_notify_func_t notify_func = merge_b->ctx->notify_func;
+            svn_error_t *err;
+
+            /* FIXME: This is lame, we should have some way of doing this
+               that doesn't involve messing with the client context, but
+               for now we have to or we get double notifications for each
+               add. */
+            merge_b->ctx->notify_func = NULL;
+
+            /* ### FIXME: This will get the file again! */
+            /* ### 838 When 838 stops using svn_client_copy the adm_access
+               parameter can be removed from the function. */
+            err = svn_client_copy (NULL, copyfrom_url, merge_b->revision,
+                                   mine, adm_access, merge_b->ctx, subpool);
+
+            merge_b->ctx->notify_func = notify_func;
+
+            if (err) return err;
+          }
         }
       break;
     case svn_node_dir:
@@ -612,18 +628,48 @@
     {
     case svn_node_none:
       if (! merge_b->dry_run)
-        /* ### FIXME: This will get the directory tree again! */
-        SVN_ERR (svn_client_copy (NULL, copyfrom_url, merge_b->revision, path,
-                                  adm_access, merge_b->ctx, subpool));
+        {
+          svn_wc_notify_func_t notify_func = merge_b->ctx->notify_func;
+          svn_error_t *err;
+
+          /* FIXME: This is lame, we should have some way of doing this
+             that doesn't involve messing with the client context, but
+             for now we have to or we get double notifications for each
+             add. */
+          merge_b->ctx->notify_func = NULL;
+
+          /* ### FIXME: This will get the directory tree again! */
+          err = svn_client_copy (NULL, copyfrom_url, merge_b->revision, path,
+                                  adm_access, merge_b->ctx, subpool);
+
+          merge_b->ctx->notify_func = notify_func;
+
+          if (err) return err;
+        }
       break;
     case svn_node_dir:
       /* Adding an unversioned directory doesn't destroy data */
       SVN_ERR (svn_wc_entry (&entry, path, adm_access, TRUE, subpool));
       if (!merge_b->dry_run
           && (! entry || (entry && entry->schedule == svn_wc_schedule_delete)))
-        /* ### FIXME: This will get the directory tree again! */
-        SVN_ERR (svn_client_copy (NULL, copyfrom_url, merge_b->revision, path,
-                                  adm_access, merge_b->ctx, subpool));
+        {
+          svn_wc_notify_func_t notify_func = merge_b->ctx->notify_func;
+          svn_error_t *err;
+
+          /* FIXME: This is lame, we should have some way of doing this
+             that doesn't involve messing with the client context, but
+             for now we have to or we get double notifications for each
+             add. */
+          merge_b->ctx->notify_func = NULL;
+
+          /* ### FIXME: This will get the directory tree again! */
+          err = svn_client_copy (NULL, copyfrom_url, merge_b->revision, path,
+                                 adm_access, merge_b->ctx, subpool);
+
+          merge_b->ctx->notify_func = notify_func;
+
+          if (err) return err;
+        }
       break;
     case svn_node_file:
       /* ### create a .drej conflict or something someday? */


more space for image headers

more space for image headers

up to 32kb for image header print, but a true expanding string would be
better

--- libvips/iofuncs/object.c
+++ libvips/iofuncs/object.c
@@ -153,7 +153,11 @@
 vips_object_print( VipsObject *object )
 {
 	VipsObjectClass *class = VIPS_OBJECT_GET_CLASS( object );
-	char str[1000];
+
+	/* This is used for printing image headers, so we may need lots of
+	 * space. See header.c.
+	 */
+	char str[32768];
 	VipsBuf buf = VIPS_BUF_STATIC( str );

 	vips_object_print_class( class );


drm/nv84: fix regression in page flipping

Need to emit the semaphore ctxdma before trying to use the semaphore
operations.

Signed-off-by: Ben Skeggs <d9f27fb07c1e9f131223ad827fa5179f3846c30b@redhat.com>

--- drivers/gpu/drm/nouveau/nv50_display.c
+++ drivers/gpu/drm/nouveau/nv50_display.c
@@ -512,11 +512,11 @@

 	/* synchronise with the rendering channel, if necessary */
 	if (likely(chan)) {
-		ret = RING_SPACE(chan, 10);
-		if (ret)
-			return ret;
-
 		if (nv_mclass(chan->object) < NV84_CHANNEL_IND_CLASS) {
+			ret = RING_SPACE(chan, 8);
+			if (ret)
+				return ret;
+
 			BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 2);
 			OUT_RING  (chan, NvEvoSema0 + nv_crtc->index);
 			OUT_RING  (chan, sync->sem.offset);
@@ -525,13 +525,17 @@
 			BEGIN_NV04(chan, 0, NV11_SUBCHAN_SEMAPHORE_OFFSET, 2);
 			OUT_RING  (chan, sync->sem.offset ^ 0x10);
 			OUT_RING  (chan, 0x74b1e000);
-			BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1);
-			OUT_RING  (chan, NvSema);
 		} else
 		if (nv_mclass(chan->object) < NVC0_CHANNEL_IND_CLASS) {
 			u64 offset = nv84_fence_crtc(chan, nv_crtc->index);
 			offset += sync->sem.offset;

+			ret = RING_SPACE(chan, 12);
+			if (ret)
+				return ret;
+
+			BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1);
+			OUT_RING  (chan, chan->vram);
 			BEGIN_NV04(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4);
 			OUT_RING  (chan, upper_32_bits(offset));
 			OUT_RING  (chan, lower_32_bits(offset));
@@ -545,6 +549,10 @@
 		} else {
 			u64 offset = nv84_fence_crtc(chan, nv_crtc->index);
 			offset += sync->sem.offset;
+
+			ret = RING_SPACE(chan, 10);
+			if (ret)
+				return ret;

 			BEGIN_NVC0(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4);
 			OUT_RING  (chan, upper_32_bits(offset));


* subversion/libsvn_client/info.c
  (svn_client_info3): Move some variables to tighter scope.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1182396 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_client/info.c
+++ subversion/libsvn_client/info.c
@@ -269,14 +269,12 @@
                  svn_client_ctx_t *ctx,
                  apr_pool_t *pool)
 {
-  svn_ra_session_t *ra_session, *parent_ra_session;
+  svn_ra_session_t *ra_session;
   svn_revnum_t rev;
   const char *url;
-  svn_node_kind_t url_kind;
   const char *repos_root_URL, *repos_UUID;
   svn_lock_t *lock;
   svn_boolean_t related;
-  apr_hash_t *parent_ents;
   const char *parent_url, *base_name;
   svn_dirent_t *the_ent;
   svn_client_info2_t *info;
@@ -323,6 +321,10 @@
   if (err && err->apr_err == SVN_ERR_RA_NOT_IMPLEMENTED)
     {
       /* Fall back to pre-1.2 strategy for fetching dirent's URL. */
+      svn_node_kind_t url_kind;
+      svn_ra_session_t *parent_ra_session;
+      apr_hash_t *parent_ents;
+
       svn_error_clear(err);

       if (strcmp(url, repos_root_URL) == 0)


try to handle mmap failing in source

try to handle mmap failing in source

Some filesystems have mmap disabled. Make vips_source_map() fall back to
read if mmap fails.

See https://github.com/libvips/libvips/discussions/2415

--- libvips/iofuncs/source.c
+++ libvips/iofuncs/source.c
@@ -1002,23 +1002,26 @@
 		vips_source_test_features( source ) )
 		return( NULL );

-	if( !source->data ) {
-		/* Seekable descriptors can simply be mapped. Seekable sources
-		 * can be read. All other sources must be streamed into memory.
-		 */
-		if( vips_source_is_mappable( source ) ) {
-			if( vips_source_descriptor_to_memory( source ) )
-				return( NULL );
-		}
-		else if( !source->is_pipe ) {
-			if( vips_source_read_to_memory( source ) )
-				return( NULL );
-		}
-		else {
-			if( vips_source_pipe_read_to_position( source, -1 ) )
-				return( NULL );
-		}
-	}
+	/* Try to map the file into memory, if possible. Some filesystems have
+	 * mmap disabled, so we don't give up if this fails.
+	 */
+	if( !source->data &&
+		vips_source_is_mappable( source ) )
+		(void) vips_source_descriptor_to_memory( source );
+
+	/* If it's not a pipe, we can rewind, get the length, and read the
+	 * whole thing.
+	 */
+	if( !source->data &&
+		!source->is_pipe &&
+		vips_source_read_to_memory( source ) )
+		return( NULL );
+
+	/* We don't know the length and must read and assemble in chunks.
+	 */
+	if( !source->data &&
+		vips_source_pipe_read_to_position( source, -1 ) )
+		return( NULL );

 	if( length_out )
 		*length_out = source->length;


hopefully fixed ciso646 changes - simplified: can be simplifed more once I can compiler on unix - I think we can lose qCompilerSupportsISO646Operators define and file - but check with Sterl

--- Library/Sources/Stroika/Foundation/Configuration/Common.h
+++ Library/Sources/Stroika/Foundation/Configuration/Common.h
@@ -6,12 +6,7 @@

 #include	<cstddef>
 #include	<cstdint>
-
-#if qCompilerSupportsISO646Operators
-	#include	<ciso646.h>
-#else
-	#include	<iso646.h>
-#endif
+#include	<ciso646>

 namespace	Stroika {
@@ -25,6 +20,8 @@

 			#define	Nil		NULL

+#if 0
+			// Sterl - what compilers do we need this for - if none - lets leave it out til needed
 			#if !qCompilerSupportsISO646Operators
 				#if  !defined(and)
 					 #define and	&&
@@ -40,13 +37,13 @@
 					 #define xor_eq	^=
 				#endif /* !defined(and) */
 			#endif /* !qCompilerSupportsISO646Operators */
-
+#endif
 			#define	nonvirtual
 			#define override		virtual

-			#define	NEltsOf(X)		(sizeof(X)/sizeof(X[0]))
-			#define	StartOfArray(X)	(&X[0])
-			#define	EndOfArray(X)	(&X[NEltsOf(X)])
+			#define	NEltsOf(X)		(sizeof((X))/sizeof((X)[0]))
+			#define	StartOfArray(X)	(&(X)[0])
+			#define	EndOfArray(X)	(&(X)[NEltsOf(X)])

 			/*


V4L/DVB (13730): [Mantis] Add in some UART definitions

Signed-off-by: Manu Abraham <158873d90a7ef40f3637a222b7329c09d0222554@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <ad86ba2154032c9f55743a190faa2459a9d61d42@redhat.com>

error: pathspec 'drivers/media/dvb/mantis/mantis_uart.h' did not match any file(s) known to git

--- drivers/media/dvb/mantis/mantis_uart.h
+++ drivers/media/dvb/mantis/mantis_uart.h
@@ -0,0 +1,18 @@
+#ifndef __MANTIS_UART_H
+#define __MANTIS_UART_H
+
+enum mantis_baud {
+	MANTIS_BAUD_9600	= 0,
+	MANTIS_BAUD_19200,
+	MANTIS_BAUD_38400,
+	MANTIS_BAUD_57600,
+	MANTIS_BAUD_115200
+};
+
+enum mantis_parity {
+	MANTIS_PARITY_NONE	= 0,
+	MANTIS_PARITY_EVEN,
+	MANTIS_PARITY_ODD
+};
+
+#endif // __MANTIS_UART_H


* subversion/libsvn_client/util.c   (svn_client__path_relative_to_root): Update an obsolete comment.

--- subversion/libsvn_client/util.c
+++ subversion/libsvn_client/util.c
@@ -90,10 +90,7 @@
   /* If we have a WC path... */
   if (! svn_path_is_url(abspath_or_url))
     {
-      /* ...fetch its entry, and attempt to get both its full URL and
-         repository root URL.  If we can't get REPOS_ROOT from the WC
-         entry, we'll get it from the RA layer.*/
-
+      /* ... query it directly. */
       SVN_ERR(svn_wc__node_get_repos_relpath(&repos_relpath,
                                              wc_ctx,
                                              abspath_or_url,


Ensure memory source is non-null

Ensure memory source is non-null

--- libvips/iofuncs/source.c
+++ libvips/iofuncs/source.c
@@ -318,7 +318,9 @@
 	if( vips_object_argument_isset( object, "blob" ) ) {
 		size_t length;

-		source->data = vips_blob_get( source->blob, &length );
+		if( !(source->data = vips_blob_get( source->blob, &length )) )
+			return( -1 );
+
 		source->length = VIPS_MIN( length, G_MAXSSIZE );
 	}


[media] smiapp: Prepare and unprepare clocks correctly

Prepare clocks before enabling and unprepare after disabling them.

Signed-off-by: Sakari Ailus <8d98c2be02a446df653daa2c00496b87f3f016e4@iki.fi>
Signed-off-by: Laurent Pinchart <3ded2f39a78f0d7044839546f95841842b4d7c96@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <0cae1d1e981e84d16b82ca3d17be8a7f826608d3@samsung.com>

--- drivers/media/i2c/smiapp/smiapp-core.c
+++ drivers/media/i2c/smiapp/smiapp-core.c
@@ -1122,9 +1122,9 @@
 		rval = sensor->platform_data->set_xclk(
 			&sensor->src->sd, sensor->platform_data->ext_clk);
 	else
-		rval = clk_enable(sensor->ext_clk);
+		rval = clk_prepare_enable(sensor->ext_clk);
 	if (rval < 0) {
-		dev_dbg(&client->dev, "failed to set xclk\n");
+		dev_dbg(&client->dev, "failed to enable xclk\n");
 		goto out_xclk_fail;
 	}
 	usleep_range(1000, 1000);
@@ -1244,7 +1244,7 @@
 	if (sensor->platform_data->set_xclk)
 		sensor->platform_data->set_xclk(&sensor->src->sd, 0);
 	else
-		clk_disable(sensor->ext_clk);
+		clk_disable_unprepare(sensor->ext_clk);

 out_xclk_fail:
 	regulator_disable(sensor->vana);
@@ -1270,7 +1270,7 @@
 	if (sensor->platform_data->set_xclk)
 		sensor->platform_data->set_xclk(&sensor->src->sd, 0);
 	else
-		clk_disable(sensor->ext_clk);
+		clk_disable_unprepare(sensor->ext_clk);
 	usleep_range(5000, 5000);
 	regulator_disable(sensor->vana);
 	sensor->streaming = 0;
@@ -2839,7 +2839,7 @@
 		if (sensor->platform_data->set_xclk)
 			sensor->platform_data->set_xclk(&sensor->src->sd, 0);
 		else
-			clk_disable(sensor->ext_clk);
+			clk_disable_unprepare(sensor->ext_clk);
 		sensor->power_count = 0;
 	}


MdeModulePkg/UdfDxe: Remove negative comparison of unsigned number

This patch gets rid of a negative comparison of an UINT64 type (Offset)
as it'll never evaluate to true.

Cc: Star Zeng <5c6bb72efe464613af94e84c05522a361b23844a@intel.com>
Cc: Eric Dong <fa9eeec52367040ac98013bc4b2913db170588f8@intel.com>
Cc: Ruiyu Ni <9fa3a6894a36bca79e6a72ad65af5a5702efecd1@intel.com>
Cc: Dandan Bi <1e8692d8ed8470b17e8ddd7612a0f029768dcb56@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Reported-by: Star Zeng <5c6bb72efe464613af94e84c05522a361b23844a@intel.com>
Signed-off-by: Paulo Alcantara <875cae76f32e6d68a7dda9c640ac11e815398b68@zytor.com>
Reviewed-by: Star Zeng <5c6bb72efe464613af94e84c05522a361b23844a@intel.com>

--- MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
+++ MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
@@ -1082,9 +1082,6 @@

         if (FilePosition + ExtentLength > ReadFileInfo->FilePosition) {
           Offset = ReadFileInfo->FilePosition - FilePosition;
-          if (Offset < 0) {
-            Offset = -(Offset);
-          }
         } else {
           Offset = 0;
         }


Fix cleared-error leak in FSFS.  Specifically, if a move-into-place
fails due to the paths being on different filesystems, we clear the
error and fall back to a copy... but then we return the (destroyed)
error anyway.  This can be triggered by (say) making the transactions/
directory be a symlink to another filesystem.  (In this particular
case, this can trigger a segfault.)

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__move_into_place): Set err to SVN_NO_ERROR after destroying
   it.

--- subversion/libsvn_fs_fs/fs_fs.c
+++ subversion/libsvn_fs_fs/fs_fs.c
@@ -4739,6 +4739,7 @@

       /* Can't rename across devices; fall back to copying. */
       svn_error_clear(err);
+      err = SVN_NO_ERROR;
       SVN_ERR(svn_io_copy_file(old_filename, new_filename, TRUE, pool));

       /* Flush the target of the copy to disk. */


V4L/DVB (13192): gspca - pac_common: redesign function for finding Start Of Frame

The original implementation of pac_find_sof() does not always find
the Start Of Frame (SOF) marker. Replace it with a state machine
based design.

Acked-by: Hans de Goede <9fa1be1a5b5729e4c6b404f34c9ce49ff4882fd8@redhat.com>
Signed-off-by: Marton Nemeth <8fdce27e837180693215edc025691c83b7d5795b@freemail.hu>
Signed-off-by: Jean-Francois Moine <e5394ce9c4b9ae7d2c4686830c5ac5f3b9028b6a@free.fr>
Signed-off-by: Mauro Carvalho Chehab <ad86ba2154032c9f55743a190faa2459a9d61d42@redhat.com>


auth: auth_stream_reply_remove() left extra TABs to stream. Normally this wouldn't really affect anything, except log some extra debug messages.

--- src/auth/auth-stream.c
+++ src/auth/auth-stream.c
@@ -76,15 +76,16 @@
 	if (!auth_stream_reply_find_area(reply, key, &idx, &len))
 		return;

-	if (str_len(reply->str) < idx + len) {
-		/* remove also trailing tab */
-		len++;
-	} else if (str_len(reply->str) == idx + len && idx > 0) {
-		/* removing last item, remove preceding tab */
+	if (idx == 0 && str_len(reply->str) == len) {
+		/* removing the only item */
+	} else if (str_len(reply->str) == idx + len) {
+		/* removing the last item -> remove the preceding tab */
 		len++;
 		idx--;
+	} else {
+		/* remove the trailing tab */
+		len++;
 	}
-
 	str_delete(reply->str, idx, len);
 }


Factor out some common code introduced in r1079070.

* subversion/libsvn_subr/sqlite.c
  (reset_all_statements): New.
  (with_transaction, svn_sqlite__with_lock): Use the above.

--- subversion/libsvn_subr/sqlite.c
+++ subversion/libsvn_subr/sqlite.c
@@ -958,6 +958,28 @@
   return svn_error_wrap_apr(result, NULL);
 }

+static svn_error_t *
+reset_all_statements(svn_sqlite__db_t *db,
+                     svn_error_t *error_to_wrap)
+{
+  int i;
+  svn_error_t *err;
+
+  /* ### Should we reorder the errors in this specific case
+     ### to avoid returning the normal error as top level error? */
+
+  err = svn_error_compose_create(error_to_wrap,
+                   svn_error_create(SVN_ERR_SQLITE_RESETTING_FOR_ROLLBACK,
+                                    NULL, NULL));
+
+  for (i = 0; i < db->nbr_statements; i++)
+    if (db->prepared_stmts[i] && db->prepared_stmts[i]->needs_reset)
+      err = svn_error_compose_create(err,
+                                svn_sqlite__reset(db->prepared_stmts[i]));
+
+  return err;
+}
+
 /* The body of svn_sqlite__with_transaction() and
    svn_sqlite__with_immediate_transaction(), which see. */
 static svn_error_t *
@@ -977,8 +999,6 @@

       if (err2 && err2->apr_err == SVN_ERR_SQLITE_BUSY)
         {
-          int i;
-
           /* ### Houston, we have a problem!

              We are trying to rollback but we can't because some
@@ -998,19 +1018,7 @@
              help diagnosing the original error and help in finding where
              a reset statement is missing. */

-          /* ### Should we reorder the errors in this specific case
-             ### to avoid returning the normal error as top level error? */
-
-          err2 = svn_error_compose_create(err2,
-                   svn_error_create(SVN_ERR_SQLITE_RESETTING_FOR_ROLLBACK,
-                                    NULL, NULL));
-
-          for (i = 0; i < db->nbr_statements; i++)
-            if (db->prepared_stmts[i] && db->prepared_stmts[i]->needs_reset)
-              err2 = svn_error_compose_create(
-                         err2,
-                         svn_sqlite__reset(db->prepared_stmts[i]));
-
+          err2 = reset_all_statements(db, err2);
           err2 = svn_error_compose_create(
                       exec_sql(db, "ROLLBACK TRANSACTION;"),
                       err2);
@@ -1076,18 +1084,7 @@
              ### See huge comment in svn_sqlite__with_transaction for
                  further details */

-          int i;
-
-          err2 = svn_error_compose_create(err2,
-                   svn_error_create(SVN_ERR_SQLITE_RESETTING_FOR_ROLLBACK,
-                                    NULL, NULL));
-
-          for (i = 0; i < db->nbr_statements; i++)
-            if (db->prepared_stmts[i] && db->prepared_stmts[i]->needs_reset)
-              err2 = svn_error_compose_create(
-                         err2,
-                         svn_sqlite__reset(db->prepared_stmts[i]));
-
+          err2 = reset_all_statements(db, err2);
           err2 = svn_error_compose_create(exec_sql(db, buf), err2);
         }


V4L/DVB: hdpvr-core: make module parameters local

The default_video_input and default_audio_input module parameters are
only used inside the hdpvr-core.c file so make them static.

This will remove the following sparse warnings (see "make C=1"):
 * warning: symbol 'default_video_input' was not declared. Should it be static?
 * warning: symbol 'default_audio_input' was not declared. Should it be static?

Signed-off-by: Márton Németh <8fdce27e837180693215edc025691c83b7d5795b@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <ad86ba2154032c9f55743a190faa2459a9d61d42@redhat.com>

--- drivers/media/video/hdpvr/hdpvr-core.c
+++ drivers/media/video/hdpvr/hdpvr-core.c
@@ -39,12 +39,12 @@
 module_param(hdpvr_debug, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(hdpvr_debug, "enable debugging output");

-uint default_video_input = HDPVR_VIDEO_INPUTS;
+static uint default_video_input = HDPVR_VIDEO_INPUTS;
 module_param(default_video_input, uint, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(default_video_input, "default video input: 0=Component / "
 		 "1=S-Video / 2=Composite");

-uint default_audio_input = HDPVR_AUDIO_INPUTS;
+static uint default_audio_input = HDPVR_AUDIO_INPUTS;
 module_param(default_audio_input, uint, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(default_audio_input, "default audio input: 0=RCA back / "
 		 "1=RCA front / 2=S/PDIF");


aws_util: remove duplicated debug string

--- src/aws/flb_aws_util.c
+++ src/aws/flb_aws_util.c
@@ -544,7 +544,7 @@
     if (ret == JSMN_ERROR_INVAL || ret == JSMN_ERROR_PART) {
         flb_free(tokens);
         flb_debug("[aws_client] Unable to parse API response- response is not"
-                  "not valid JSON.");
+                  " valid JSON.");
         return NULL;
     }


moblin-panel-status: Switch to being a Clutter/GTK+ hybrid panel

This is necessary in order to get a GtkIconTheme for the launcher.

--- src/moblin-panel-status.c
+++ src/moblin-panel-status.c
@@ -34,6 +34,8 @@

 #include <clutter/clutter.h>
 #include <nbtk/nbtk.h>
+#include <gtk/gtk.h>
+#include <clutter/x11/clutter-x11.h>

 #include <mojito-client/mojito-client.h>

@@ -1050,6 +1052,7 @@
 setup_standalone (MoblinStatusPanel *status_panel)
 {
   ClutterActor *stage, *status;
+  Window xwin;

   status = make_status (status_panel);
   clutter_actor_set_size (status, 1000, 400);
@@ -1057,6 +1060,11 @@
   stage = clutter_stage_get_default ();
   clutter_actor_set_size (stage, 1000, 400);
   clutter_container_add_actor (CLUTTER_CONTAINER (stage), status);
+
+  clutter_actor_realize (stage);
+  xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
+
+  MPL_PANEL_CLUTTER_SETUP_EVENTS_WITH_GTK_FOR_XID (xwin);

   clutter_actor_show (stage);
 }
@@ -1072,6 +1080,8 @@
                                  NULL,
                                  "status-button",
                                  TRUE);
+
+  MPL_PANEL_CLUTTER_SETUP_EVENTS_WITH_GTK (panel);

   status = make_status (status_panel);
   mpl_panel_clutter_track_actor_height (MPL_PANEL_CLUTTER (panel), status);
@@ -1114,26 +1124,28 @@
 main (int argc, char *argv[])
 {
   MoblinStatusPanel *panel;
-  GError *error;
+  GOptionContext *context;
+  GError *error = NULL;

   setlocale (LC_ALL, "");
   bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);

-  error = NULL;
-  clutter_init_with_args (&argc, &argv,
-                          "- Mutter-moblin's status page",
-                          status_options,
-                          GETTEXT_PACKAGE,
-                          &error);
-
-  if (error)
-    {
-      g_critical ("Unable to initialize Clutter: %s", error->message);
-      g_clear_error (&error);
-      return EXIT_FAILURE;
-    }
+  context = g_option_context_new ("- mutter-moblin status panel");
+  g_option_context_add_main_entries (context, status_options, GETTEXT_PACKAGE);
+  g_option_context_add_group (context, clutter_get_option_group_without_init ());
+  g_option_context_add_group (context, gtk_get_option_group (FALSE));
+
+  if (!g_option_context_parse (context, &argc, &argv, &error))
+  {
+    g_critical (G_STRLOC ": Error parsing option: %s", error->message);
+    g_clear_error (&error);
+  }
+
+  g_option_context_free (context);
+
+  MPL_PANEL_CLUTTER_INIT_WITH_GTK (&argc, &argv);

   nbtk_texture_cache_load_cache (nbtk_texture_cache_get_default (),
                                  NBTK_CACHE);


Finalize.

Finalize.

--- KERN/netinet/sctp_crc32.c
+++ KERN/netinet/sctp_crc32.c
@@ -716,7 +716,7 @@
 #if !defined(SCTP_WITH_NO_CSUM)

 static uint32_t
-sctp_finalize_crc32(uint32_t crc32c)
+sctp_finalize_crc32c(uint32_t crc32c)
 {
 	uint32_t result;


bonding: fix detach of bonded device

bonding: fix detach of bonded device

Check that the bonded device has no slaves before detaching it.

Fixes: 8d30fe7fa737 ("bonding: support port hotplug")

Signed-off-by: Bernard Iremonger <233eeff376ad0c06f66f06c5522ea3c4feb30d3b@intel.com>
Acked-by: Declan Doherty <b4388acd850cd8caad5000a112795063f04807ac@intel.com>

--- drivers/net/bonding/rte_eth_bond_api.c
+++ drivers/net/bonding/rte_eth_bond_api.c
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
  *   All rights reserved.
  *
  *   Redistribution and use in source and binary forms, with or without
@@ -277,6 +277,7 @@
 rte_eth_bond_free(const char *name)
 {
 	struct rte_eth_dev *eth_dev = NULL;
+	struct bond_dev_private *internals;

 	/* now free all data allocation - for eth_dev structure,
 	 * dummy pci driver and internal (private) data
@@ -286,6 +287,10 @@
 	eth_dev = rte_eth_dev_allocated(name);
 	if (eth_dev == NULL)
 		return -ENODEV;
+
+	internals = eth_dev->data->dev_private;
+	if (internals->slave_count != 0)
+		return -EBUSY;

 	if (eth_dev->data->dev_started == 1) {
 		bond_ethdev_stop(eth_dev);


* subversion/libsvn_subr/sqlite.c
  (svn_sqlite__column_bytes): Fix return type.

Found by: gstein

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1095150 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_subr/sqlite.c
+++ subversion/libsvn_subr/sqlite.c
@@ -536,7 +536,7 @@
   return sqlite3_column_type(stmt->s3stmt, column) == SQLITE_NULL;
 }

-svn_boolean_t
+int
 svn_sqlite__column_bytes(svn_sqlite__stmt_t *stmt, int column)
 {
   return sqlite3_column_bytes(stmt->s3stmt, column);


Make calling autocommit with the same value as set a NOOP to suppress a warning from the DB

--- dbd/postgresql/connection.c
+++ dbd/postgresql/connection.c
@@ -109,10 +109,12 @@
     int err = 0;

     if (conn->postgresql) {
-	if (on)
-	    err = rollback(conn);
-	else
-	    err = begin(conn);
+	if (on != conn->autocommit) {
+	    if (on)
+		err = rollback(conn);
+	    else
+		err = begin(conn);
+	}

 	conn->autocommit = on;
     }